Simon noticed that gdb.threads/threads-after-exec.exp was racy. You can consistenly reproduce it (at git hash 319b460545dc79280e2904dcc280057cf71fb753), with: $ taskset -c 0 make check TESTS="gdb.threads/threads-after-exec.exp" gdb.log shows: (...) Thread 3 "threads-after-e" hit Catchpoint 2 (exec'd .../gdb.threads/threads-after-exec/threads-after-exec), 0x00007ffff7fe3290 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) PASS: gdb.threads/threads-after-exec.exp: continue until exec info threads Id Target Id Frame * 3 process 1443269 "threads-after-e" 0x00007ffff7fe3290 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) FAIL: gdb.threads/threads-after-exec.exp: info threads (...) maint info linux-lwps LWP Ptid Thread ID 1443269.1443269.0 1.3 (gdb) FAIL: gdb.threads/threads-after-exec.exp: maint info linux-lwps The FAILs happen because the .exp file expects that after the exec, the only thread has GDB thread number 1, but it has instead 3. This is yet another case of zombie leader detection making things a bit fuzzy. In the passing case, we have: continue Continuing. [New Thread 0x7ffff7bff640 (LWP 603183)] [Thread 0x7ffff7bff640 (LWP 603183) exited] process 603180 is executing new program: .../gdb.threads/threads-after-exec/threads-after-exec While in the failing case, we have (note remarks on the rhs): continue Continuing. [New Thread 0x7ffff7bff640 (LWP 600205)] [Thread 0x7ffff7f95740 (LWP 600202) exited] <<< gdb deletes leader thread, thread 1. [New LWP 600202] <<< gdb adds it back -- this is now thread 3. [Thread 0x7ffff7bff640 (LWP 600205) exited] process 600202 is executing new program: .../threads-after-exec/threads-after-exec The testcase only has two threads, yet GDB presented the exec for thread 3. This is GDB deleting the leader (the backend detected it was zombie, due to the exec), and then adding the leader back when it saw the exec event. I've recorded some thoughts about this in PR gdb/31069. For now, this commit just makes the testcase cope with the non-one thread number, as the number is not important for what this test is exercising. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31069 Change-Id: Id80b5c73f09c9e0005efeb494cca5d066ac3bbae
…
…
…
…
…
…
…
…
…
…
…
…
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.
Description