Binutils with MCST patches
Go to file
Pedro Alves 4f8d22e3b4 Exited threads.
* thread.c (enum thread_state): New.
	(thread_state main_thread_running): Delete, in favor of...
	(thread_state main_thread_state): ... this.  Update throughout.
	(clear_thread_inferior_resources): New, split from free_thread.
	(free_thread): Call clear_thread_inferior_resources.
	(init_thread_list): Set main thread to stopped state.
	(add_thread_silent): Take care of PTID reuses.
	(delete_thread): If deleting inferior_ptid or a thread with
	refcount > 0, mark it as exited, but still keep it in the list.
	Only notify of thread exits, if we haven't done so yet.
	(iterate_over_threads): Make it safe to delete threads while
	iterating over them.
	(do_captured_list_thread_ids): Don't account for exited threads.
	(thread_alive): Check for the THREAD_EXITED state, and don't set
	ptid to -1 on exited threads.
	(set_running): Update to account for extra possible states.
	(is_thread_state): New.
	(is_stopped, is_exited): New.
	(is_running): Implement in terms of is_thread_state.
	(any_running): Update.
	(print_thread_info): Update.  Account for exited threads.  Don't
	warn about missed frame restoring here, its done in the cleanup.
	(switch_to_thread): Don't read from a thread that has gone.
	(restore_current_thread): In non-stop mode, do a full context
	switch.
	(restore_selected_frame): Add a frame_level argument.  Rewrite.
	(struct current_thread_cleanup): Add selected_frame_level and
	was_stopped members.
	(do_restore_current_thread_cleanup): Check if thread was stopped
	and still is, and if the target has registers, stack and memory
	before restoring the selected frame.  Don't delete the cleanup
	argument here.
	(restore_current_thread_cleanup_dtor): New.
	(make_cleanup_restore_current_thread): Remove all arguments.
	Rewrite.
	(thread_apply_all_command): Update.  Prune threads.
	(thread_apply_command): Update.
	(thread_command): Account for currently selected exited thread.
	(do_captured_thread_select): Check for a running thread.  Prune
	threads.
	(_initialize_thread): Make "info threads", "thread", "thread
	apply", and "thread apply all" appliable without a selected thread.
	* gdbthread.h (struct thread_info): Replace running_ by state_.
	Add refcount.
	(is_exited, is_stopped): Declare.
	(make_cleanup_restore_current_thread): Remove all arguments.
	* infrun.c: Include "event-top.h".
	(fetch_inferior_event): In non-stop mode, restore selected thread
	and frame after handling the event and running breakpoint
	commands.  Display GDB prompt if needed.
	(normal_stop): In non-stop mode, don't print thread switching
	notice.
	* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
	(get_cmd_no_selected_thread_ok): New.
	* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
	(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
	Declare.
	* cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
	no-selected-thread ok.
	* top.c (execute_command): Check for non no-selected-thread-ok
	commands.
	* linux-nat.c (struct saved_ptids, threads_to_delete)
	(record_dead_thread, prune_lwps): Delete.
	(exit_lwp): Unconditionally delete thread.
	(linux_nat_resume): Remove prune_lwps call.
	* infcmd.c (proceed_thread_callback): Check if !is_stopped instead
	of is_running.  Adjust to make_cleanup_restore_current_thread
	interface change.
	* mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
	selected thread has exited.
	* inf-loop.c (inferior_event_handler): Don't display the prompt
	here.
	* varobj.c (c_value_of_root): Update.
	* defs.h (make_cleanup_dtor): Declare.
	* utils.c (make_cleanup_dtor): New.

	* Makefile.in (infrun.o): Depend on $(event_top_h).
2008-07-11 11:07:39 +00:00
bfd (read_section): Take pointer to bfd_size_type instead 2008-07-11 09:18:19 +00:00
binutils * binutils-all/objdump.W: Generalize to adjust for targets with 2008-07-11 10:47:29 +00:00
config * configure: Regenerate. 2008-06-17 23:14:44 +00:00
cpu * mt.opc (parse_imm16): Apply 2007-09-26 opcodes/mt-asm.c change 2008-01-29 03:50:23 +00:00
elfcpp 2008-06-12 David S. Miller <davem@davemloft.net> 2008-06-12 16:58:40 +00:00
etc * standards.texi: Import 22 July 2007 version. 2007-08-13 09:45:22 +00:00
gas include/elf/ 2008-07-10 19:05:29 +00:00
gdb Exited threads. 2008-07-11 11:07:39 +00:00
gold Handle output sections with more than 0x7fffffff bytes. 2008-07-10 23:01:20 +00:00
gprof * basic_blocks.c: Always include "gprof.h" first. 2008-06-19 16:30:29 +00:00
include include/elf/ 2008-07-10 19:05:29 +00:00
intl merge from gcc 2008-06-18 03:36:03 +00:00
ld bfd/ 2008-07-10 19:06:54 +00:00
libdecnumber merge from gcc 2008-06-18 03:36:03 +00:00
libiberty 2008-06-19 Eric Blake <ebb9@byu.net> 2008-06-19 15:17:56 +00:00
opcodes include/elf/ 2008-07-10 19:05:29 +00:00
readline PR gdb/544 2008-03-24 12:59:51 +00:00
sim * common.m4: Add test for libz and zlib.h. 2008-07-11 02:42:35 +00:00
texinfo
.cvsignore
COPYING
COPYING.LIB
COPYING.LIBGLOSS 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 20:47:45 +00:00
COPYING.NEWLIB 2007-12-19 Jeff Johnston <jjohnstn@redhat.com> 2007-12-19 19:12:23 +00:00
COPYING3 * COPYING3: New file. Contains version 3 of the GNU General Public License. 2007-07-17 13:50:23 +00:00
COPYING3.LIB * COPYING3: New file. Contains version 3 of the GNU General Public License. 2007-07-17 13:50:23 +00:00
ChangeLog * src-release (BINUTILS_SUPPORT_DIRS): Remove mkdep and depcomp. 2008-06-18 23:20:43 +00:00
MAINTAINERS * MAINTAINERS: Replace reference to configure.in with reference to configure.ac. 2008-04-18 08:55:06 +00:00
Makefile.def * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_BUILD. 2008-06-08 16:19:22 +00:00
Makefile.in * Makefile.tpl: Fix comment errors. 2008-06-16 21:30:58 +00:00
Makefile.tpl * Makefile.tpl: Fix comment errors. 2008-06-16 21:30:58 +00:00
README
README-maintainer-mode
compile
config-ml.in 2007-11-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2007-11-29 15:36:39 +00:00
config.guess * config.sub, config.guess: Update from upstream sources. 2008-04-14 09:28:35 +00:00
config.rpath * config.rpath: Add AIX 6 support. 2008-03-13 19:27:44 +00:00
config.sub * config.sub, config.guess: Update from upstream sources. 2008-04-14 09:28:35 +00:00
configure * configure: Regenerate. 2008-06-17 23:14:44 +00:00
configure.ac * configure.ac: Set TOPLEVEL_CONFIGURE_ARGUMENTS early, when 2008-06-16 21:38:13 +00:00
depcomp
djunpack.bat
install-sh
libtool.m4 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2008-03-16 06:49:28 +00:00
ltgcc.m4 2007-05-31 Paolo Bonzini <bonzini@gnu.org> 2007-05-31 06:40:36 +00:00
ltmain.sh 2007-05-25 Andreas Tobler <a.tobler@schweiz.org> 2007-05-25 19:56:24 +00:00
ltoptions.m4 * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
ltsugar.m4 2008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2008-03-16 06:49:28 +00:00
ltversion.m4 * ltmain.sh: Update from GCC. 2007-05-24 17:33:42 +00:00
lt~obsolete.m4 2007-07-05 H.J. Lu <hongjiu.lu@intel.com> 2007-07-05 17:57:04 +00:00
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
setup.com
src-release * src-release (BINUTILS_SUPPORT_DIRS): Remove mkdep and depcomp. 2008-06-18 23:20:43 +00:00
symlink-tree
ylwrap

README

		   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.