+2008-07-29 Stan Shebs <stan@codesourcery.com>
+
+ * main.c (captured_main): Remove long-unused #if 0 blocks.
+
+2008-07-28 Tom Tromey <tromey@redhat.com>
+
+ * annotate.h (deprecated_annotate_starting_hook): Remove.
+ (deprecated_annotate_stopped_hook): Remove.
+ (deprecated_annotate_exited_hook): Remove.
+ * Makefile.in (annotate.o): Depend on observer_h.
+ * top.c (deprecated_delete_breakpoint_hook): Remove.
+ (deprecated_create_breakpoint_hook): Likewise.
+ (deprecated_modify_breakpoint_hook): Likewise.
+ * interps.c (clear_interpreter_hooks): Update for removed hooks.
+ * breakpoint.c (mention): Don't call removed hook.
+ (delete_breakpoint): Likewise.
+ (disable_breakpoint): Likewise.
+ (do_enable_breakpoint): Likewise.
+ * annotate.c: Include observer.h.
+ (breakpoint_changed): Change type of argument.
+ (_initialize_annotate): Register observers.
+ (deprecated_annotate_starting_hook): Remove.
+ (deprecated_annotate_stopped_hook): Remove.
+ (deprecated_annotate_exited_hook): Remove.
+ (annotate_starting): Update for hook removal.
+ (annotate_stopped): Likewise.
+ (annotate_exited): Likewise.
+ * defs.h (deprecated_delete_breakpoint_hook): Remove.
+ (deprecated_create_breakpoint_hook): Likewise.
+ (deprecated_modify_breakpoint_hook): Likewise.
+
+2008-07-28 Tom Tromey <tromey@redhat.com>
+
+ * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.ac: Check for the GNU/Linux ptrace signature.
+ * configure: Regenerated.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-nat.c (resume_callback): Add more debugging output.
+ (linux_nat_has_pending_sigint): New function, based on
+ linux_nat_has_pending.
+ (set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
+ (stop_wait_callback): Remove flush_mask handling. Honor
+ ignore_sigint. Call maybe_clear_ignore_sigint. Pass NULL
+ to recursive calls.
+ (linux_nat_has_pending, flush_callback): Remove.
+ (linux_nat_filter_event): Check for ignore_sigint.
+ (linux_nat_wait): Remove flush_mask support and call to
+ flush_callback. Use set_ignore_sigint and maybe_clear_ignore_sigint.
+ * linux-nat.h (struct lwp_info): Add ignore_sigint field.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
+ report events from resumed threads.
+
+2008-07-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
+ (mips_linux_init_abi): Set tdep->syscall_next_pc.
+ * mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
+ mips-tdep.h.
+ (mips32_next_pc): Handle the syscall instruction.
+ * mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
+ from mips-tdep.c. Add syscall_next_pc to gdbarch_tdep.
+
+2008-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1158:
+ * valops.c (value_struct_elt): Treat function-valued field as a
+ static method.
+
+2008-07-26 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/1136:
+ * macroexp.c (get_punctuator) <punctuators>: Rearrange to put
+ longer tokens first.
+
+2008-07-26 Vladimir Prus <vladimir@codesourcery.com>
+
+ Kill cmd_async_ok.
+ * cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
+ (get_cmd_async_ok): Remove.
+ * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
+ * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
+ * infcmd.c (_initialize_infcmd): Likewise.
+ * thread.c (_initialize_thread): Likewise.
+
+2008-07-25 Joseph Myers <joseph@codesourcery.com>
+
+ * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
+ 128-bit long doubles in even-odd pairs of FPRs. Do not
+ right-align float arguments for big-endian.
+ (mips_n32n64_return_value): Apply return value convention for
+ structs containing one or two floating-point values to soft-float
+ as well as hard-float. Handle 128-bit long doubles in such
+ structs.
+ (mips_o32_push_dummy_call): Only skip one integer register for a
+ float argument passed in an FPR.
+
+2008-07-25 Tom Tromey <tromey@redhat.com>
+
+ * tui/tui-hooks.c: Include observer.h.
+ (tui_event_default, tui_old_event_hooks, tui_event_hooks):
+ Remove.
+ (tui_bp_created_observer, tui_bp_deleted_observer,
+ tui_bp_modified_observer): New globals.
+ (tui_install_hooks): Use observers, not events.
+ (tui_remove_hooks): Likewise.
+ * mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
+ (mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
+ globals.
+ (breakpoint_notify): Check mi_can_breakpoint_notify.
+ (breakpoint_hooks): Remove.
+ (mi_cmd_break_insert): Attach observers. Don't use events.
+ * tracepoint.c: Include observer.h, not gdb-events.h.
+ (tracepoint_operation, trace_pass_command): Notify observer.
+ * interps.c: Don't include gdb-events.h.
+ (clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
+ * gdbarch.c: Rebuild.
+ * gdbarch.sh: Emit include for observer.h, not gdb-events.h.
+ (deprecated_current_gdbarch_select_hack): Notify observer.
+ * breakpoint.h: Don't include gdb-events.h.
+ * breakpoint.c: Don't include gdb-events.h.
+ (condition_command): Notify observer.
+ (commands_command): Likewise.
+ (commands_from_control_command): Likewise.
+ (mention, delete_breakpoint, set_ignore_count): Likewise.
+ (disable_breakpoint, do_enable_breakpoint): Likewise.
+ * Makefile.in (gdb_events_h): Remove.
+ (breakpoint_h): Update.
+ (COMMON_OBS): Remove gdb-events.o.
+ (gdb-events.o): Remove.
+ (breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
+ gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
+ * gdb-events.c: Remove.
+ * gdb-events.h: Remove.
+ * gdb-events.sh: Remove.
+
+2008-07-24 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_threads_extra_info): Don't query the remote
+ server about info on the internally added main thread.
+
+2008-07-24 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (procfs_attach): Populate initial thread list.
+ (procfs_wait): Return new pid, built from the inferior status.
+
+2008-07-23 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
+ * configure: Regenerate.
+
+2008-07-23 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * nto-procfs.c (procfs_xfer_memory): Changed signature.
+ (procfs_resume): Workaround for dereferencing type-punned pointer
+ warning.
+ * nto-tdep.c (nto_parse_redirection): Change signature to be const
+ correct.
+ * nto-tdep.h (nto_parse_redirection): Likewise.
+
+2008-07-21 Stan Shebs <stan@codesourcery.com>
+
+ Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
+ * gdbarch.sh: Adjust comment to refer to
+ in_solib_dynsym_resolve_code().
+ * gdbarch.h, gdbarch.c: Update.
+ * solib-osf.c: Ditto.
+ * infrun.c: Ditto.
+ (handle_inferior_event): Use in_solib_dynsym_resolve_code
+ unconditionally.
+ * config/mips/nm-irix5.h: Remove undef of
+ IN_SOLIB_DYNSYM_RESOLVE_CODE.
+
+2008-07-21 Tom Tromey <tromey@redhat.com>
+
+ * symfile.c (reread_symbols): Don't pass argument to observer.
+ * exec.c (exec_file_attach): Don't pass argument to observer.
+ * ada-lang.c (ada_executable_changed_observer): Remove argument.
+ * symtab.c (symtab_observer_executable_changed): Remove argument.
+ * observer.sh: Handle functions with no arguments.
+
+2008-07-20 Sergei Poselenov <sposelenov@emcraft.com>
+ Chris Demetriou <cgd@google.com>
+
+ * elfread.c (elf_symfile_segments): Fix the check that each loadable
+ section fits within an ELF segment to handle ELF segments that hit
+ the end of the address space.
+
+2008-07-20 Chris Demetriou <cgd@google.com>
+
+ * MAINTAINERS (Write After Approval): Add self.
+
+2008-07-18 Tom Tromey <tromey@redhat.com>
+
+ PR gdb/855:
+ * NEWS: Add entry for macro commands.
+ * Makefile.in (macrocmd.o): Add gdb_string.h.
+ * macroscope.h (user_macro_scope): Declare.
+ (default_macro_scope): Update documentation.
+ (macro_user_macros): Declare.
+ * c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
+ Use user_macro_scope.
+ (null_macro_lookup): Remove.
+ * macrotab.h (macro_callback_fn): Declare.
+ (macro_for_each): Likewise.
+ (macro_allow_redefinitions): Likewise.
+ * macrotab.c (foreach_macro): New function
+ (macro_for_each): Likewise.
+ (struct macro_table) <redef_ok>: New field.
+ (macro_allow_redefinitions): New function.
+ (new_macro_table): Update.
+ (macro_define_function): Likewise.
+ (macro_define_object): Likewise.
+ * macroscope.c (user_macro_scope): New function.
+ (default_macro_scope): Use it.
+ (macro_user_macros): New global.
+ (standard_macro_lookup): Look in macro_user_macros.
+ (_initialize_macroscope): New function.
+ * macroexp.h (macro_is_whitespace, macro_is_digit,
+ macro_is_identifier_nondigit): Declare.
+ * macroexp.c (macro_is_whitespace): Rename. No longer static.
+ (macro_is_digit): Likewise.
+ (macro_is_identifier_nondigit): Likewise.
+ (get_identifier): Update.
+ (get_pp_number): Likewise.
+ (get_token): Likewise.
+ * macrocmd.c (skip_ws): New function.
+ (extract_identifier): Likewise.
+ (free_macro_definition_ptr): Likewise.
+ (user_macros): Remove.
+ (macro_define_command): Implement.
+ (_initialize_macrocmd): Update.
+ (macro_undef_command): Implement.
+ (print_one_macro): New function.
+ (macro_list_command): Implement.
+
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
+ in BFD ELF check.
+ * configure: Regenerate.
+
+2008-07-17 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * auxv.c (fprint_target_auxv): Stop at AT_NULL.
+
+2008-07-15 Andreas Schwab <schwab@suse.de>
+
+ * valops.c (value_cast_pointers): Follow typedefs when checking
+ result of coercion.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * block.c (block_function): Renamed to ...
+ (block_linkage_function): ... this. All callers changed.
+ * block.h (block_function): Renamed to ...
+ (block_linkage_function): ... this.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * frame.c (frame_sp_unwind): Delete.
+ (get_frame_sp): Do not use it.
+ * frame.h (frame_sp_unwind): Delete prototype.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
+ * frame.c (frame_unwind_address_in_block): Delete.
+ (get_frame_address_in_block): Do not use it. Check the type
+ of the next frame first.
+ (frame_cleanup_after_sniffer): Update comment.
+ * frame.h (frame_unwind_address_in_block): Delete prototype.
+ * hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * frame.c (frame_func_unwind): Delete.
+ (get_frame_func): Do not use it.
+ * frame.h (frame_func_unwind): Delete prototype.
+ * hppa-tdep.c (hppa_frame_cache): Update comment.
+ * rs6000-tdep.c (rs6000_frame_cache): Update comment.
+
+2008-07-14 Stan Shebs <stan@codesourcery.com>
+
+ * remote-sim.c (init_gdbsim_ops): Remove
+ TARGET_REDEFINE_DEFAULT_OPS.
+
+2008-07-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * findvar.c (read_var_value): Remove unused variable.
+
+2008-07-15 Luis Machado <luisgpm@br.ibm.com>
+
+ * infrun.c (handle_inferior_event): Tag threads as stopped
+ before inserting breakpoints.
+
+2008-07-15 Hui Zhu <teawater@gmail.com>
+
+ * MAINTAINERS: Added myself to section Write After Approval.
+
+2008-07-14 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ PR gdb/2477
+ * cp-abi.c (value_virtual_fn_field): Handle invalid pointers.
+
+2008-07-14 Pedro Alves <pedro@codesourcery.com>
+
+ * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
+ (i386_dicos_push_dummy_code): New.
+ (i386_dicos_init_abi): Don't register i386_dicos_frame_align.
+ Register i386_dicos_push_dummy_code.
+
+2008-07-14 Markus Deuling <deuling@de.ibm.com>
+
+ * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
+ (mips_n32n64_push_dummy_call, mips_o64_return_value)
+ (mips_eabi_push_dummy_call): Update call to fp_register_arg_p.
+
+ (MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
+ (fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
+ (mips_n32n64_fp_arg_chunk_p): Update caller.
+
+ (mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
+ (mips_n32n64_push_dummy_call): Update caller.
+
+ (MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
+ current_gdbarch.
+ (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
+ (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.
+
+
+ (MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
+ current_gdbarch.
+ (mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
+ (mips_o64_push_dummy_call): Update caller.
+
+ (MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
+ (fp_register_arg_p, mips_dump_tdep): Update caller.
+
+ (set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
+ (mips16_scan_prologue, mips32_scan_prologue): Update caller.
+
+ (reset_saved_regs): Make static. Add gdbarch as parameter. Replace
+ current_gdbarch.
+ (mips32_scan_prologue): Update caller.
+
+ (heuristic_proc_start): Add gdbarch as parameter. Replace
+ current_gdbarch.
+ (mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.
+
+ * mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
+ (mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
+ the current architecture. Update call to getregs_supplies.
+ (getregs_supplies): Add gdbarch as parameter and replace
+ current_gdbarch.
+
+ * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
+ get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
+ NBSD_MIPS_JB_ELEMENT_SIZE.
+ (NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
+ replace current_gdbarch.
+
+ * remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
+ current_gdbarch.
+ (mips_fetch_registers, mips_store_registers): Update call
+ to mips_map_regno.
+ (mips_load): Use get_regcache_arch to get at the current_architecture
+ and replace current_gdbarch.
+
+2008-07-13 Pedro Alves <pedro@codesourcery.com>
+
+ * thread.c (restore_selected_frame): On fail to restore, select
+ the innermost frame, and don't crash when warning the user.
+
+2008-07-13 Hui Zhu <teawater@gmail.com>
+
+ * symtab.c (expand_line_sal): Fix a memory leak.
+
+2008-07-13 Pedro Alves <pedro@codesourcery.com>
+
+ * utils.c (struct continuation): Define as inheriting struct
+ cleanup.
+ (add_continuation, do_all_continuations)
+ (discard_all_continuations, add_intermediate_continuation)
+ (do_all_intermediate_continuations)
+ (discard_all_intermediate_continuations): Adjust.
+
+2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
+
+ Skip varobj in running threads.
+ * mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
+ thread is not stopped, skip the varobj.
+ * Makefile.in: Update dependencies.
+
+2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
+
+ Enable all commands while inferiour is running
+ * mi/mi-main.c (mi_cmd_execute): Don't check if
+ inferiour is executing.
+
+2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
+
+ Allow all CLI command even if target is executing.
+ * gdb/top.c (execute_command_1): Don't check if the inferiour
+ is running.
+
+2008-07-13 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
+ Fix printing of frame, when frame is wrong.
+
+2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-tdep.c (spu_frame_unwind_cache): Do not error if
+ backchain is unreadable.
+
+2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu-linux-nat.c: Include "gdbthread.h".
+ (spu_child_post_startup_inferior): Register main thread.
+ (spu_child_post_attach): Likewise.
+ * Makefile.in (spu-linux-nat.o): Update dependencies.
+
+2008-07-12 Pedro Alves <pedro@codesourcery.com>
+
+ Rewrite continuations internals on top of cleanups and plug
+ continuation arguments leaks.
+
+ * defs.h (struct continuation): Make it opaque.
+ (add_continuation, add_intermediate_continuation): Drop the int
+ argument of the continuation hook argument. Add
+ continuation_free_args argument.
+ (do_all_continuations, do_all_intermediate_continuations): Drop
+ the error_p argument.
+
+ * utils.c (add_continuation): Drop the int argument of the
+ continuation hook argument. Add continuation_free_args argument.
+ Reimplement on top of cleanups.
+ (do_all_continuations): Drop error argument. Reimplement on top
+ of cleanups.
+ (discard_all_continuations): Reimplement on top of cleanups.
+ (add_intermediate_continuation): Drop the int argument of the
+ continuation hook argument. Add continuation_free_args argument.
+ Reimplement on top of cleanups.
+ (do_all_intermediate_continuations): Drop error argument.
+ Reimplement on top of cleanups.
+ (discard_all_intermediate_continuations): Reimplement on top of
+ cleanups.
+
+ * breakpoint.c (until_break_command_continuation): Drop error
+ argument. Add xfree as continuation argument deleter.
+
+ * inf-loop.c (inferior_event_handler): On error, discard all
+ continuations. Adjust to new do_all_intermediate_continuations
+ and do_all_continuations interfaces.
+
+ * infcmd.c (step_1_continuation): Drop error_p argument. Adjust.
+ Pass xfree as continuation argument deleter.
+ (finish_command_continuation): Drop error_p argument. Adjust.
+ (finish_command_continuation_free_arg): New.
+ (finish_command): Pass finish_command_continuation_free_arg as
+ continuation argument deleter. Adjust to new do_all_continuations
+ interfaces.
+ (attach_command_continuation): Drop error_p argument.
+ (attach_command_continuation_free_args): New.
+ (attach_command): Pass attach_command_continuation_free_args as
+ continuation argument deleter.
+
+ * interps.c (interp_set): Adjust to new do_all_continuations
+ interfaces.
+
+ * event-top.c (stdin_event_handler): In error, also discard the
+ intermediate continuations.
+
+2008-07-12 Pedro Alves <pedro@codesourcery.com>
+
+ Replace struct continuation_args by void* and per command structs.
+
+ * top.c (execute_command): Remove unused arg1 and arg2 locals.
+
+ * breakpoint.c (struct until_break_command_continuation_args):
+ New.
+ (until_break_command_continuation): Take a void* instead of a
+ continuations_arg. Adjust.
+ (until_break_command): Adjust to use struct
+ until_break_command_continuation_args instead of struct
+ continuation_arg.
+
+ * infcmd.c (struct step_1_continuation_args): New.
+ (step_1_continuation): Take a void* instead of a
+ continuations_arg. Adjust to use struct step_1_continuation_args.
+ (step_once): Adjust to use struct step_1_continuation_args.
+
+ (struct finish_command_continuation_args): New.
+ (finish_command_continuation): Take a void* instead of a
+ continuations_arg. Adjust to use struct
+ finish_command_continuation_args.
+ (finish_command): Adjust to use struct
+ finish_command_continuation_args.
+ (struct attach_command_continuation_args): New.
+ (attach_command_continuation): Take a void* instead of a
+ continuations_arg. Adjust to use struct
+ attach_command_continuation_args.
+ (attach_command): Adjust to use struct
+ attach_command_continuation_args.
+
+ * defs.h (struct continuation_arg): Delete.
+ (struct continuation): Replace the struct continuation_arg*
+ parameter of continuation_hook by a void*. Replace "arg_list"
+ member by a new "args" member with void* type.
+ (add_continuation, add_intermediate_continuation): Replace struct
+ continuation_arg type usages by void* usages.
+
+ * utils.c (add_continuation, do_all_continuations)
+ (add_intermediate_continuation)
+ (do_all_intermediate_continuations): Replace struct
+ continuation_arg type usages by void* usages. Pass "args" instead
+ of "arg_list".
+
+2008-07-12 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (struct thread_stepping_state): Delete sal member.
+ (init_thread_stepping_state): Add local sal. Use it instead of
+ tss->sal.
+ (handle_inferior_event): New local stop_pc_sal. Use it instead of
+ tss->sal.
+ (step_into_function): Add local stop_func_sal. Use it instead of
+ tss->sal.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement -exec-continue/-exec-interrupt --all.
+ * infcmd.c (continue_1): New, extracted from
+ (continue_command): ...here.
+ (interrupt_target_1): New, extracted from
+ (interrupt_target_command): ...here.
+ * inferior.h (continue_1, interrupt_target_1): New.
+ * mi/mi-main.c (mi_cmd_exec_continue)
+ (mi_cmd_exec_interrupt): Handle --all.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ Implement --thread and --frame.
+ * gdbthread.h (find_thread_id): Declare.
+ * thread.c (find_thread_id): Make non-static.
+ * mi/mi-main.c (mi_cmd_execute): Switch to the right
+ thread and frame, if necessary.
+ * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
+ * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ * infrun.c (resume): Discard cleanups on early exit path.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ * infrun.c (normal_stop): For MI, report which threads
+ were stopped.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ Report thread state in -thread-info output.
+ * thread.c (print_thread_info): Add new field "state".
+
+2008-07-11 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (handle_inferior_event): Also ignore a
+ TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
+
+2008-07-11 Tom Tromey <tromey@redhat.com>
+
+ * completer.c (complete_line_internal): New function, from
+ complete_line. Add 'for_help' parameter.
+ (complete_line): Use it.
+ (command_completer): Move later. Rewrite.
+
+2008-07-11 Pedro Alves <pedro@codesourcery.com>
+
+ * thread.c (thread_apply_command): Move making the cleanup out of
+ the loop.
+
+2008-07-11 Pedro Alves <pedro@codesourcery.com>
+
+ 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 Pedro Alves <pedro@codesourcery.com>
+
+ Add "continue -a" and "interrupt -a" options for non-stop mode.
+
+ * infcmd.c (proceed_thread_callback, do_context_switch_to): New.
+ (continue_command): Add "-a" option.
+ (interrupt_target_command): Add "-a" option.
+ (_initialize_infcmd): Add extend help of continue and interrupt
+ command to mention the new "-a" option. Mark "continue" async ok.
+
+2008-07-10 Doug Evans <dje@google.com>
+
+ Add "set print symbol-loading on|off".
+ * NEWS: Document new option.
+ * symfile.h (print_symbol_loading): Declare.
+ * symfile.c (print_symbol_loading): New global.
+ (symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
+ from ..." if print_symbol_loading.
+ (_initialize_symfile): Add set/show print symbol-loading.
+ * solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
+ if print_symbol_loading.
+
+2008-07-10 Pedro Alves <pedro@codesourcery.com>
+
+ Non-stop linux native.
+
+ * linux-nat.c (linux_test_for_tracefork): Block events while we're
+ here.
+ (get_pending_status): Implement non-stop mode.
+ (linux_nat_detach): Stop threads before detaching.
+ (linux_nat_resume): In non-stop mode, always resume only a single
+ PTID.
+ (linux_handle_extended_wait): On a clone event, in non-stop mode,
+ add new lwp to GDB's thread table, and mark as running, executing
+ and stopped appropriately.
+ (linux_nat_filter_event): Don't assume there are other running
+ threads when a thread exits.
+ (linux_nat_wait): Mark the main thread as running and executing.
+ In non-stop mode, don't stop all lwps.
+ (linux_nat_kill): Stop lwps before killing them.
+ (linux_nat_thread_alive): Use signal 0 to detect if a thread is
+ alive.
+ (send_sigint_callback): New.
+ (linux_nat_stop): New.
+ (linux_nat_add_target): Set to_stop to linux_nat_stop.
+
+ * linux-nat.h (thread_db_attach_lwp): Declare.
+
+ * linux-thread-db.c (thread_get_info_callback): Check for new
+ threads if we have none.
+ (thread_from_lwp, enable_thread_event): Set proc_handle.pid to the
+ stopped lwp. Check for new threads if we have none.
+ (thread_db_attach_lwp): New.
+ (thread_db_init): Set proc_handle.pid to inferior_ptid.
+ (check_event): Set proc_handle.pid to the stopped lwp.
+ (thread_db_find_new_threads): Set proc_handle.pid to any stopped
+ lwp available, bail out if there is none.
+
+ * linux-fork.c (linux_fork_killall): Use SIGKILL instead of
+ PTRACE_KILL.
+
+2008-07-10 Kevin Buettner <kevinb@redhat.com>
+
+ * rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
+ `current_pc' from CORE_ADDR to ULONGEST.
+
+ * remote-sim.c (gdbsim_cntrl_c): Pass remote_sim_ptid to
+ gdbsim_stop().
+
+2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * NEWS (New commands): Mention "set disable-randomization".
+ * configure.ac: Add check for HAVE_PERSONALITY and
+ HAVE_DECL_ADDR_NO_RANDOMIZE.
+ * configure, config.in: Regenerate.
+ * linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
+ [HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
+ ADDR_NO_RANDOMIZE.
+ (disable_randomization, show_disable_randomization)
+ (set_disable_randomization): New.
+ (linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
+ PERSONALITY_ORIG and PERSONALITY_SET. Disable randomization upon the
+ variable DISABLE_RANDOMIZATION.
+ (_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
+ DISABLE_RANDOMIZATION.
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+
+ Adjust all targets to new target_stop interface.
+
+ * gnu-nat.c (gnu_stop): Add ptid argument.
+ * go32-nat.c (go32_stop): Add ptid argument.
+ (go32_create_inferior): Pass inferior_ptid to go32_stop.
+ * hpux-thread.c (hpux_thread_stop): Add ptid argument.
+ * monitor.c (monitor_stop): Add ptid argument.
+ (monitor_open): Pass inferior_ptid to monitor_stop.
+ (monitor_interrupt): Pass inferior_ptid to target_stop.
+ (monitor_stop): Add ptid argument.
+ * nto-procfs.c (nto_interrupt): Pass inferior_ptid to target_stop.
+ (procfs_create_inferior): Add ptid argument.
+ * procfs.c (procfs_stop): Add ptid argument.
+ * remote-m32r-sdi.c (m32r_stop): Add ptid argument.
+ * remote-sim.c (gdbsim_stop): Add ptid argument.
+ * sol-thread.c (sol_thread_stop): Add ptid argument.
+ * win32-nat.c (win32_stop): Add ptid argument.
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+
+ Non-stop inferior control.
+
+ * infrun.c (resume): In non-stop mode, always resume just one
+ thread.
+ (proceed): Don't call prepare_to_proceed in non-stop mode.
+ (fetch_inferior_event): In non-stop mode, switch context before
+ handling the event.
+ (error_is_running, ensure_not_running): New.
+ (handle_inferior_event): In non-stop mode: Mark only the event
+ thread as stopped. Require that the target module manages adding
+ threads to the thread list. Assert that there isn't a
+ deferred_step_ptid set. Don't switch to infwait_thread_hop_state.
+ (normal_stop): Only mark not-running if inferior hasn't exited.
+ In non-stop mode, only mark the event thread.
+
+ * thread.c:Include "cli/cli-decode.h".
+ (print_thread_info): Don't read from a running thread.
+ Output "(running)" if thread is running.
+ (switch_to_thread): Don't read stop_pc if thread is executing.
+ (do_restore_current_thread_cleanup): Don't write to a running
+ thread.
+ (thread_apply_all_command): Don't read from a running thread. In
+ non-stop mode, do a full context-switch instead of just switching
+ threads.
+ (thread_apply_command): In non-stop mode, do a full context-switch
+ instead of just switching threads.
+ (do_captured_thread_select): Likewise. Inform user if selected
+ thread is running.
+ (_initialize_thread): Mark "info threads" and "thread" and
+ async_ok.
+
+ * inf-loop.c (inferior_event_handler): In non-stop mode, don't
+ unregister the target from the event loop.
+
+ * infcmd.c (continue_command, step_1, jump_command)
+ (signal_command): Ensure the selected thread isn't running.
+ (interrupt_target_command): In non-stop mode, interrupt only the
+ selected thread.
+
+ * inferior.h (error_is_running, ensure_not_running): Declare.
+
+ * target.h (struct target_ops): Add ptid argument to the to_stop
+ member.
+ (target_stop): Add ptid_t argument.
+
+ * target.c (update_current_target): Add ptid argument to to_stop's
+ type.
+ (debug_to_stop): Add ptid_t argument.
+ (debug_to_rcmd): Set to_stop_ptid.
+
+ * remote.c (remote_stop): Add ptid_t argument.
+ (async_remote_interrupt): Add inferior_ptid to target_stop.
+ * inf-ptrace.c (inf_ptrace_stop): Add ptid argument.
+
+ * Makefile.in (thread.o): Depend on $(cli_decode_h).
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+
+ Don't rely on ecs->wait_for_more.
+
+ * infrun.c (proceed): Clear the stepping state, set
+ previous_inferior_ptid and clear infwait state.
+ (wait_for_inferior): Don't clear the stepping state, set
+ previous_inferior_ptid, or clear the infwait state here.
+ (fetch_inferior_event): Don't clear the stepping state, set
+ previous_inferior_ptid, or clear the infwait state here. Don't
+ condition on wait_for_more.
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+
+ Refactor infrun a bit.
+
+ * infrun.c (currently_stepping): Take a struct
+ thread_stepping_state instead of an execution_control_state.
+ (struct thread_stepping_state): New, split from
+ execution_control_state.
+ (gtss, tss): New globals.
+ (proceed): Clear the stepping state, set previous_inferior_ptid
+ and clear infwait state.
+ (init_wait_for_inferior): Clear the stepping state,
+ previous_inferior_ptid and infwait state.
+ (waiton_ptid, infwait_state): New, split from
+ execution_control_state.
+ (struct execution_control_state): Members that persist through
+ events moved out to either struct thred_stepping_state or made
+ global. Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
+ (wait_for_inferior, fetch_inferior_event): Use local
+ execution_control_state. Update to execution_control_state split.
+ (init_execution_control_state): Adjust.
+ (init_thread_stepping_state): New, extracted from
+ init_execution_control_state.
+ (context_switch): Take a ptid instead of an
+ execution_control_state.
+ (context_switch_to): Adjust.
+ (adjust_pc_after_break): Adjust.
+ (init_infwait_state): New.
+ (handle_inferior_event): Adjust.
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com>
+
+ Per-thread commands.
+
+ * gdbthread.h: Remove unneeded forward declarations.
+ Include "inferior.h".
+ (struct thread_info): Add continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi and stop_signal members.
+ (save_infrun_state): Add continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi, stop_signal and stop_bpstat parameters.
+ (load_infrun_state): Add continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi, stop_signal and stop_bpstat parameters.
+
+ * thread.c (load_infrun_state): In non-stop mode, load
+ continuations, intermediate_continuations, proceed_to_finish,
+ step_over_calls, stop_step, step_multi and stop_signal.
+ (save_infrun_state): Store continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi, stop_signal and stop_bpstat.
+ (save_infrun_state): Store continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi, stop_signal and stop_bpstat.
+ (free_thread): Clear The thread's stop_bpstat.
+
+ * inferior.h (context_switch_to): Declare.
+
+ * infrun.c (ecss): New global.
+ (context_switch): Context switch continuations,
+ intermediate_continuations, proceed_to_finish, step_over_calls,
+ stop_step, step_multi, stop_signal and stop_bpstat.
+ (wait_for_inferior): Use global ecss.
+ (async_ecss, async_ecs): Delete.
+ (fetch_inferior_event): Use global ecss.
+ (context_switch_to): New.
+
+ * top.c (execute_command): In non-stop, only check if the current
+ thread is running, in all-stop, check if there's any thread
+ running.
+
+ * breakpoint.c (bpstat_remove_breakpoint): New.
+ (bpstat_remove_breakpoint_callback): New.
+ (delete_breakpoint): Clear the stop_bpstats of all threads.
+
+ * mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
+ current thread is running, in all-stop, check if there's any
+ thread running.
+
+ * Makefile.in (gdbthread_h): Depend on $(inferior_h).
+
+2008-07-09 Pedro Alves <pedro@codesourcery.com>
+
+ Add non_stop global.
+
+ * inferior.h (non_stop): Declare.
+ * infrun.c (non_stop, non_stop_1): New.
+ (set_non_stop, show_non_stop): New.
+ (_initialize_infrun): Add "set/show non-stop" command.
+