From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26918 invoked by alias); 11 May 2011 17:20:30 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 26853 invoked by uid 9674); 11 May 2011 17:20:25 -0000 Date: Wed, 11 May 2011 17:20:00 -0000 Message-ID: <20110511172024.26837.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: Merge remote-tracking branch 'gdb/master' X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2e80e1f226b199baa820d947f303d7ff663ee748 X-Git-Newrev: 08fb1601dd0d0a425e02d3b9faff0a2c64ce1ca1 X-SW-Source: 2011-q2/txt/msg00040.txt.bz2 List-Id: The branch, master has been updated via 08fb1601dd0d0a425e02d3b9faff0a2c64ce1ca1 (commit) via 845b24d128b1a9f63f07b9fdb949d0c544a07822 (commit) via c057d2d1db9c4c8d753f64601debb1f8e5f7e668 (commit) via f74976888a6f1d0c977a9c18b8be79f5a4abca2d (commit) via 4c75e883b2f476b5ddf84ad7fe6de7df7deaf650 (commit) via 96ff500a62d1d07896a849655d0bb3b999cbd772 (commit) via bf8bc0c032fb142ed851a18699cad1013aee9f58 (commit) via aa8e19171d0a200e0d3a44f9d46b9da123865594 (commit) via 10dfcaa51cc1ea3e49016de66bd408caded2e9d8 (commit) via 3248de0b35901423585ea213f7d5985fe5146b38 (commit) via 629e0127359f334bbcdda98523ec989014e8aa0c (commit) via 26462413520c0eb3c58e6d6ed3975338097045c7 (commit) via f6d55b87b1ec29286db1ee4ea415fa7ff21989fa (commit) via 100ba5663cabeeb4c710c7df6c478ab3f973cb38 (commit) via bc50dc930cd77a8fca133b6415825d5e57506c36 (commit) via d82acf35b29152faecd4ea2d86bcab98773a8eee (commit) from 2e80e1f226b199baa820d947f303d7ff663ee748 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 08fb1601dd0d0a425e02d3b9faff0a2c64ce1ca1 Merge: 2e80e1f 845b24d Author: Jan Kratochvil Date: Wed May 11 19:19:58 2011 +0200 Merge remote-tracking branch 'gdb/master' commit 845b24d128b1a9f63f07b9fdb949d0c544a07822 Author: Jan Kratochvil Date: Wed May 11 09:11:16 2011 +0000 gdb/testsuite/ * lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers. (gdb_touch_execfile): Remove catch wrappers. New variable time. Replace `file copy' and `file rename' by `file mtime'. Twice. commit c057d2d1db9c4c8d753f64601debb1f8e5f7e668 Author: Jan Kratochvil Date: Wed May 11 05:01:35 2011 +0000 gdb/testsuite/ * gdb.base/readline-ask.c: New file. * gdb.base/readline-ask.exp: New file. * gdb.base/readline-ask.inputrc: New file. commit f74976888a6f1d0c977a9c18b8be79f5a4abca2d Author: Hans-Peter Nilsson Date: Wed May 11 04:59:28 2011 +0000 PR sim/12737 * sim/arm/iwmmxt/wcmpgt.cgs, sim/arm/iwmmxt/wmac.cgs, sim/arm/iwmmxt/wsra.cgs, sim/arm/xscale/blx.cgs: Kfail. commit 4c75e883b2f476b5ddf84ad7fe6de7df7deaf650 Author: Jan Kratochvil Date: Wed May 11 04:56:04 2011 +0000 gdb/ Make addrs->SECTINDEX always defined. * symfile.c (relative_addr_info_to_section_offsets): Check for SECTINDEX -1, not for zero ADDR. (addrs_section_compar): Remove checking for invalid SECTINDEX. (addr_info_make_relative): Set SECTINDEX to -1 for unmatched entries. * symfile.h (struct section_addr_info) : Update the comment on its validity. commit 96ff500a62d1d07896a849655d0bb3b999cbd772 Author: gdbadmin Date: Wed May 11 00:00:32 2011 +0000 *** empty log message *** commit bf8bc0c032fb142ed851a18699cad1013aee9f58 Author: Alan Modra Date: Wed May 11 00:00:06 2011 +0000 daily update commit aa8e19171d0a200e0d3a44f9d46b9da123865594 Author: Doug Evans Date: Tue May 10 18:45:21 2011 +0000 * linux-thread-db.c: Whitespace cleanup. (try_thread_db_load_1): Fix comment. commit 10dfcaa51cc1ea3e49016de66bd408caded2e9d8 Author: Doug Evans Date: Tue May 10 16:53:18 2011 +0000 * linux-thread-db.c (set_libthread_db_search_path): New function. (_initialize_thread_db): Add setter for libthread-db-search-path. gdbserver/ * thread-db.c (thread_db_handle_monitor_command): Handle elided path. doc/ * gdb.texinfo (Threads): If an empty path is provided for libthread-db-search-path it is reset to its default value. (Server): Ditto. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 12 +++ Makefile.in | 2 +- Makefile.tpl | 2 +- bfd/ChangeLog | 7 ++ bfd/elf.c | 2 + bfd/elf32-ppc.c | 2 + bfd/elf64-ppc.c | 2 + bfd/version.h | 2 +- configure | 3 + configure.ac | 2 + gdb/ChangeLog | 32 +++++++ gdb/NEWS | 6 ++ gdb/charset.c | 23 +++++- gdb/config.in | 6 ++ gdb/configure | 53 ++++++++++++ gdb/configure.ac | 23 +++++ gdb/defs.h | 6 ++ gdb/doc/ChangeLog | 10 +++ gdb/doc/gdb.texinfo | 11 ++- gdb/gdbserver/ChangeLog | 4 + gdb/gdbserver/thread-db.c | 11 ++- gdb/linux-nat.c | 5 +- gdb/linux-thread-db.c | 21 ++++- gdb/main.c | 23 +++--- gdb/symfile.c | 10 +-- gdb/symfile.h | 2 +- gdb/testsuite/ChangeLog | 12 +++ gdb/testsuite/gdb.base/readline-ask.c | 23 +++++ gdb/testsuite/gdb.base/readline-ask.exp | 118 +++++++++++++++++++++++++++ gdb/testsuite/gdb.base/readline-ask.inputrc | 16 ++++ gdb/testsuite/lib/gdb.exp | 25 ++---- gdb/version.in | 2 +- sim/bfin/ChangeLog | 5 + sim/bfin/dv-bfin_uart2.c | 1 + sim/testsuite/ChangeLog | 7 ++ sim/testsuite/sim/arm/iwmmxt/wcmpgt.cgs | 1 + sim/testsuite/sim/arm/iwmmxt/wmac.cgs | 1 + sim/testsuite/sim/arm/iwmmxt/wsra.cgs | 1 + sim/testsuite/sim/arm/xscale/blx.cgs | 1 + 39 files changed, 440 insertions(+), 55 deletions(-) create mode 100644 gdb/testsuite/gdb.base/readline-ask.c create mode 100644 gdb/testsuite/gdb.base/readline-ask.exp create mode 100644 gdb/testsuite/gdb.base/readline-ask.inputrc First 500 lines of diff: diff --git a/ChangeLog b/ChangeLog index 84903f5..028f718 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +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*, diff --git a/Makefile.in b/Makefile.in index 5cc0356..944839b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -541,7 +541,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -LDFLAGS_FOR_TARGET = +LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ diff --git a/Makefile.tpl b/Makefile.tpl index f7312d9..0b2b3d8 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -494,7 +494,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -LDFLAGS_FOR_TARGET = +LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0687337..526dd83 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2011-05-10 Jan Kratochvil + + * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and + 32bit psinfo. + * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid. + * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise. + 2011-05-09 Paul Brook * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype. diff --git a/bfd/elf.c b/bfd/elf.c index 6fccf42..966ada0 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -8000,6 +8000,7 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) memcpy (&psinfo, note->descdata, sizeof (psinfo)); + elf_tdata (abfd)->core_pid = psinfo.pr_pid; elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname)); @@ -8016,6 +8017,7 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) memcpy (&psinfo, note->descdata, sizeof (psinfo)); + elf_tdata (abfd)->core_pid = psinfo.pr_pid; elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname)); diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index c736375..42d9b46 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1881,6 +1881,8 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) return FALSE; case 128: /* Linux/PPC elf_prpsinfo. */ + elf_tdata (abfd)->core_pid + = bfd_get_32 (abfd, note->descdata + 16); elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16); elf_tdata (abfd)->core_command diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 543a727..1394ff5 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2670,6 +2670,8 @@ ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) if (note->descsz != 136) return FALSE; + elf_tdata (abfd)->core_pid + = bfd_get_32 (abfd, note->descdata + 24); elf_tdata (abfd)->core_program = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16); elf_tdata (abfd)->core_command diff --git a/bfd/version.h b/bfd/version.h index f3bfdc9..43b0ff6 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20110509 +#define BFD_VERSION_DATE 20110511 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/configure b/configure index cb341f9..30d6945 100755 --- a/configure +++ b/configure @@ -634,6 +634,7 @@ target_configargs host_configargs build_configargs BUILD_CONFIG +LDFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET @@ -6625,6 +6626,8 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then fi + + # Handle --with-headers=XXX. If the value is not "yes", the contents of # the named directory are copied to $(tooldir)/sys-include. if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then diff --git a/configure.ac b/configure.ac index 0ac9030..3960694 100644 --- a/configure.ac +++ b/configure.ac @@ -2110,6 +2110,8 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then fi AC_SUBST(CXXFLAGS_FOR_TARGET) +AC_SUBST(LDFLAGS_FOR_TARGET) + # Handle --with-headers=XXX. If the value is not "yes", the contents of # the named directory are copied to $(tooldir)/sys-include. if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d9b20f..b98297c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,35 @@ +2011-05-11 Jan Kratochvil + + Make addrs->SECTINDEX always defined. + * symfile.c (relative_addr_info_to_section_offsets): Check for + SECTINDEX -1, not for zero ADDR. + (addrs_section_compar): Remove checking for invalid SECTINDEX. + (addr_info_make_relative): Set SECTINDEX to -1 for unmatched entries. + * symfile.h (struct section_addr_info) : Update the comment + on its validity. + +2011-05-10 Doug Evans + + * linux-thread-db.c: Whitespace cleanup. + (try_thread_db_load_1): Fix comment. + + * linux-thread-db.c (set_libthread_db_search_path): New function. + (_initialize_thread_db): Add setter for libthread-db-search-path. + +2011-05-09 Doug Evans + + * NEWS: Mention --with-iconv-bin. + * configure.ac: New option --with-iconv-bin. + * configure: Regenerate. + * config.in: Regenerate. + * defs.h (relocate_gdb_directory): Declare. + * main.c (relocate_gdb_directory): Renamed from relocate_directory, + removed progname parameter, and exported. All callers updated. + * charset.c (find_charset_names): Use --with-iconv-bin if specified. + + * linux-nat.c (lin_lwp_attach_lwp): For !WIPSTOPPED case, + adding missing call to restore_child_signals_mask. + 2011-05-09 Pedro Alves * inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap' diff --git a/gdb/NEWS b/gdb/NEWS index 9b59419..e735293 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -3,6 +3,12 @@ *** Changes since GDB 7.3 +* New configure option --with-iconv-bin. + When using the internationalization support like the one in the GNU C + library, GDB will invoke the "iconv" program to get a list of supported + character sets. If this program lives in a non-standard location, one can + use this option to specify where to find it. + * When natively debugging programs on PowerPC BookE processors running a Linux kernel version 2.6.34 or later, GDB supports masked hardware watchpoints, which specify a mask in addition to an address to watch. diff --git a/gdb/charset.c b/gdb/charset.c index a84085a..b85758b 100644 --- a/gdb/charset.c +++ b/gdb/charset.c @@ -799,7 +799,9 @@ find_charset_names (void) char *args[3]; int err, status; int fail = 1; + int flags; struct gdb_environ *iconv_env; + char *iconv_program; /* Older iconvs, e.g. 2.2.2, don't omit the intro text if stdout is not a tty. We need to recognize it and ignore it. This text is @@ -811,12 +813,26 @@ find_charset_names (void) child = pex_init (PEX_USE_PIPES, "iconv", NULL); - args[0] = "iconv"; +#ifdef ICONV_BIN + { + char *iconv_dir = relocate_gdb_directory (ICONV_BIN, + ICONV_BIN_RELOCATABLE); + iconv_program = concat (iconv_dir, SLASH_STRING, "iconv", NULL); + xfree (iconv_dir); + } +#else + iconv_program = xstrdup ("iconv"); +#endif + args[0] = iconv_program; args[1] = "-l"; args[2] = NULL; + flags = PEX_STDERR_TO_STDOUT; +#ifndef ICONV_BIN + flags |= PEX_SEARCH; +#endif /* Note that we simply ignore errors here. */ - if (!pex_run_in_environment (child, PEX_SEARCH | PEX_STDERR_TO_STDOUT, - "iconv", args, environ_vector (iconv_env), + if (!pex_run_in_environment (child, flags, + args[0], args, environ_vector (iconv_env), NULL, NULL, &err)) { FILE *in = pex_read_output (child, 0); @@ -888,6 +904,7 @@ find_charset_names (void) } + xfree (iconv_program); pex_free (child); free_environ (iconv_env); diff --git a/gdb/config.in b/gdb/config.in index 01ba750..db00195 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -716,6 +716,12 @@ /* Define to 1 if you have the `_mcleanup' function. */ #undef HAVE__MCLEANUP +/* Path of directory of iconv program. */ +#undef ICONV_BIN + +/* Define if the iconv directory should be relocated when GDB is moved. */ +#undef ICONV_BIN_RELOCATABLE + /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST diff --git a/gdb/configure b/gdb/configure index 92818a0..bf6ac01 100755 --- a/gdb/configure +++ b/gdb/configure @@ -961,6 +961,7 @@ with_pkgversion with_bugurl with_zlib with_libiconv_prefix +with_iconv_bin with_system_readline with_expat with_gnu_ld @@ -1660,6 +1661,7 @@ Optional Packages: --with-zlib include zlib support (auto/yes/no) default=auto --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --with-iconv-bin=PATH specify where to find the iconv program --with-system-readline use installed readline library --with-expat include expat support (auto/yes/no) --with-gnu-ld assume the C compiler uses GNU ld default=no @@ -9523,6 +9525,57 @@ _ACEOF fi +# GDB may fork/exec the iconv program to get the list of supported character +# sets. Allow the user to specify where to find it. +# There are several factors affecting the choice of option name: +# - There is already --with-libiconv-prefix but we can't use it, it specifies +# the build-time location of libiconv files. +# - The program we need to find is iconv, which comes with glibc. The user +# doesn't necessarily have libiconv installed. Therefore naming this +# --with-libiconv-foo feels wrong. +# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is +# defined to work on directories not files (though it really doesn't know +# the difference). +# - Calling this --with-iconv-prefix is perceived to cause too much confusion +# with --with-libiconv-prefix. +# Putting these together is why the option name is --with-iconv-bin. + + +# Check whether --with-iconv-bin was given. +if test "${with_iconv_bin+set}" = set; then : + withval=$with_iconv_bin; iconv_bin="${withval}" + +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN "${iconv_bin}" +_ACEOF + + + if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then + if test "x$prefix" = xNONE; then + test_prefix=/usr/local + else + test_prefix=$prefix + fi + else + test_prefix=$exec_prefix + fi + value=0 + case ${iconv_bin} in + "${test_prefix}"|"${test_prefix}/"*|\ + '${exec_prefix}'|'${exec_prefix}/'*) + value=1 + ;; + esac + +cat >>confdefs.h <<_ACEOF +#define ICONV_BIN_RELOCATABLE $value +_ACEOF + + + +fi + + # On alpha-osf, it appears that libtermcap and libcurses are not compatible. # There is a very specific comment in /usr/include/curses.h explaining that # termcap routines built into libcurses must not be used. diff --git a/gdb/configure.ac b/gdb/configure.ac index 96e0a7b..a42ce27 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -433,6 +433,29 @@ AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl]) AM_ICONV +# GDB may fork/exec the iconv program to get the list of supported character +# sets. Allow the user to specify where to find it. +# There are several factors affecting the choice of option name: +# - There is already --with-libiconv-prefix but we can't use it, it specifies +# the build-time location of libiconv files. +# - The program we need to find is iconv, which comes with glibc. The user +# doesn't necessarily have libiconv installed. Therefore naming this +# --with-libiconv-foo feels wrong. +# - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is +# defined to work on directories not files (though it really doesn't know +# the difference). +# - Calling this --with-iconv-prefix is perceived to cause too much confusion +# with --with-libiconv-prefix. +# Putting these together is why the option name is --with-iconv-bin. + +AC_ARG_WITH(iconv-bin, +AS_HELP_STRING([--with-iconv-bin=PATH], [specify where to find the iconv program]), +[iconv_bin="${withval}" + AC_DEFINE_UNQUOTED([ICONV_BIN], ["${iconv_bin}"], + [Path of directory of iconv program.]) + GDB_AC_DEFINE_RELOCATABLE(ICONV_BIN, iconv, ${iconv_bin}) +]) + # On alpha-osf, it appears that libtermcap and libcurses are not compatible. # There is a very specific comment in /usr/include/curses.h explaining that # termcap routines built into libcurses must not be used. diff --git a/gdb/defs.h b/gdb/defs.h index 089631c..4df2a3e 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -282,6 +282,12 @@ struct breakpoint; struct frame_info; struct gdbarch; +/* From main.c. */ + +/* This really belong in utils.c (path-utils.c?), but it references some + globals that are currently only available to main.c. */ +extern char *relocate_gdb_directory (const char *initial, int flag); + /* From utils.c */ extern void initialize_utils (void); diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 2eacb32..0dd6806 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,13 @@ +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 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 3618b70..9ccc48a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -2855,7 +2855,7 @@ watchpoints in programs with multiple threads. 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 -an empty list. +its default value. On @sc{gnu}/Linux and Solaris systems, @value{GDBN} uses a ``helper'' @code{libthread_db} library to obtain information about threads in the @@ -16369,7 +16369,7 @@ protocol (@pxref{Remote Protocol}). 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 an empty list. +@samp{libthread-db-search-path} will be reset to its default value. @item monitor exit Tell gdbserver to exit immediately. This command should be followed by @@ -31214,7 +31214,12 @@ 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}. -On systems with @code{iconv}, you can install GNU Libiconv. If you +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. diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a29ee23..bea804d 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2011-05-10 Doug Evans + + * thread-db.c (thread_db_handle_monitor_command): Handle elided path. + 2011-05-04 Doug Evans * linux-low.c (linux_join): Skip process lookup. diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index 529516e..872151e 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -916,9 +916,14 @@ thread_db_mourn (struct process_info *proc) int thread_db_handle_monitor_command (char *mon) { - if (strncmp (mon, "set libthread-db-search-path ", 29) == 0) + const char *cmd = "set libthread-db-search-path"; + size_t cmd_len = strlen (cmd); + + if (strncmp (mon, cmd, cmd_len) == 0 + && (mon[cmd_len] == '\0' + || mon[cmd_len] == ' ')) { - const char *cp = mon + 29; + const char *cp = mon + cmd_len; if (libthread_db_search_path != NULL) free (libthread_db_search_path); @@ -927,6 +932,8 @@ thread_db_handle_monitor_command (char *mon) while (isspace (*cp)) ++cp; + if (*cp == '\0') + cp = LIBTHREAD_DB_SEARCH_PATH; libthread_db_search_path = xstrdup (cp); hooks/post-receive -- Repository for Project Archer.