2009-07-25  Michael Snyder  <msnyder@vmware.com>

	* target.h (struct target_ops): New methods to_set_checkpoint,
	to_unset_checkpoint, to_restore_checkpoint, to_info_checkpoints.
	* target.c (update_current_target): Inherit the above methods.
2009-07-25  Michael Snyder  <msnyder@vmware.com>

	* target.h (struct target_ops): New methods to_set_checkpoint,
	to_unset_checkpoint, to_restore_checkpoint, to_info_checkpoints.
	* target.c (update_current_target): Inherit the above methods.
2009-07-25  Michael Snyder  <msnyder@vmware.com>

	* checkpoint.c: New file, target-agnostic checkpoints.
	* checkpoint.h: New file, interface.
	* Makefile.in (SFILES): Add checkpoint.c.
2009-07-25  Michael Snyder  <msnyder@vmware.com>

	* inf-child.c (inf_child_target): Initialize target_ops only once.
	* inf-ptrace.c (inf_ptrace_target): Ditto.
	(inf_ptrace_trad_target): Ditto.
	* linux-nat.c (linux_target): Ditto.
	(linux_trad_target): Ditto.

	* linux-fork.c (_initialize_linux_fork): Rather than calling
	add_cmd to add checkpoint commands, use 'linux_target' to
	get the target vector, add the checkpoint functions to it,
	and call checkpoint_init to activate the user commands.
	(linux_fork_killall): Add optional verbose output.
2009-07-26  Michael Snyder  <msnyder@vmware.com>

	In-flux state: target methods temporarily broken.

	* checkpoint.c (checkpoint_insert): New function.
	(checkpint_first): New function.
	(checkpoint_next): New function.
	(checkpoint_unlink): New function.
	(checkpoint_find_id): New function.
	(checkpoint_command): Manage list locally.
	(delete_checkpoint_command): Ditto.
	(info_checkpoints_command): Ditto.
	(restart_command): Ditto

	* checkpoint.h (checkpoint_insert, checkpoint_first,
	checkpoint_next, checkpoint_unlink, checkpoint_find_id): Export.

	* record.c (record_insert_checkpoint): New function.
	(record_delete_checkpoint): New function.
	(record_show_checkpoint_info): New function.
	(record_goto_checkpoint): New function.
	(record_restore_checkpoint): New function.
2009-07-26  Michael Snyder  <msnyder@vmware.com>

	Nearly working.

	* target.h (struct target_ops): Change func args of
	checkpoint methods.

	checkpoint.c (checkpoint_command): Use target method,
	bail if it isn't implemented.
	(delete_checkpoint_command): Ditto.
	(info_checkpoints_command): Ditto.
	(restart_command): Ditto.

	linux-fork.c (fork_list): Delete, use checkpoint list instead.
	(forks_exist_p): Check checkpoint list instead of fork_list.
	(delete_fork): Ditto.
	(find_fork_ptid): Ditto.
	(find_fork_id): Ditto.
	(find_fork_pid): Ditto.
	(add_fork): Ditto.
	(linux_fork_killall): Ditto.
	(linux_fork_mourn_inferior): Ditto.
	(linux_fork_detach): Ditto.
	(init_fork_list): Delete, no longer needed.
	(delete_checkpoint_command): Ditto.
	(info_checkpoints_command): Ditto.
	(checkpoint_command): Ditto.
	(restart_command): Ditto.
	(linux_unset_checkpoint): New function (target method).
	(linux_show_checkpoints_info): Ditto.
	(linux_set_checkpoint): Ditto.
	(linux_restore_checkpoint): Ditto.
	(_initialize_linux_fork): Use new target methods.

	* record.c (init_record_ops): Use new target methods.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (record_restore_checkpoint): Count instructions, not
	record entries.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (record_restore_checkpoint): Count instructions, not
	record entries.
2009-08-04  Hui Zhu  <teawater@gmail.com>
	    Michael Snyder  <msnyder@vmware.com>
	    (Import from main branch)
	* record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
	(record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
	(record_wait): Set 'mem_entry_not_accessible' flag if target
	memory not readable.  Don't try to change target memory if
	'mem_entry_not_accessible' is set.
2009-08-04  Hui Zhu  <teawater@gmail.com>
	    Michael Snyder  <msnyder@vmware.com>
	    (Import from main branch)
	* record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
	(record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
	(record_wait): Set 'mem_entry_not_accessible' flag if target
	memory not readable.  Don't try to change target memory if
	'mem_entry_not_accessible' is set.
2009-08-04  Hui Zhu  <teawater@gmail.com>

	* record.c (record_exec_entry): New function.
	(record_wait): Call 'record_exec_entry'.
2009-08-04  Hui Zhu  <teawater@gmail.com>

	* record.c (record_exec_entry): New function.
	(record_wait): Call 'record_exec_entry'.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (record_goto_checkpoint): Call record_exec_entry.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (record_goto_checkpoint): Call record_exec_entry.
2009-08-06  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* gcore.c (create_gcore_bfd): New function, abstracted
	from gcore_command for export.
	(write_gcore_file): New function, abstracted from
	gcore_command for export.
	(gcore_command): Call helper functions (above).

	(call_target_sbrk): New function, abstracted from
	derive_heap_segment.
	(derive_heap_segment): Call helper function (above).

	(load_core_segments): New function.
	(load_corefile): New function.
	(rcore_command): New function.
	(_initialize_gcore): Add new command "restore-core-file".
2009-08-06  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* gcore.c (create_gcore_bfd): New function, abstracted
	from gcore_command for export.
	(write_gcore_file): New function, abstracted from
	gcore_command for export.
	(gcore_command): Call helper functions (above).

	(call_target_sbrk): New function, abstracted from
	derive_heap_segment.
	(derive_heap_segment): Call helper function (above).

	(load_core_segments): New function.
	(load_corefile): New function.
	(rcore_command): New function.
	(_initialize_gcore): Add new command "restore-core-file".
2009-08-06  Hui Zhu  <teawater@gmail.com>
	    Michael Snyder  <msnyder@vmware.com>
	(Add record dump/load commands: draft version, not ready for release).

	* record.c (RECORD_FILE_MAGIC): New constant.
	(record_arch_list_add_reg): Use xcalloc instead of xmalloc.
	(record_exec_entry): Pre-zero the register buffer.
	(cmd_record_fd_cleanup): New function (dead).
	(cmd_record_dump): New function.
	(bfdcore_read): New function.
	(cmd_record_load): New function.
	(_initialize_record): Add 'record dump' and 'record load' commands.
2009-08-06  Hui Zhu  <teawater@gmail.com>
	    Michael Snyder  <msnyder@vmware.com>
	(Add record dump/load commands: draft version, not ready for release).

	* record.c (RECORD_FILE_MAGIC): New constant.
	(record_arch_list_add_reg): Use xcalloc instead of xmalloc.
	(record_exec_entry): Pre-zero the register buffer.
	(cmd_record_fd_cleanup): New function (dead).
	(cmd_record_dump): New function.
	(bfdcore_read): New function.
	(cmd_record_load): New function.
	(_initialize_record): Add 'record dump' and 'record load' commands.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (cmd_record_dump): Clean up draft version.
	(cmd_record_load): Ditto.
2009-08-06  Michael Snyder  <msnyder@vmware.com>

	* record.c (cmd_record_dump): Clean up draft version.
	(cmd_record_load): Ditto.