aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-nat.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-022011-09-02 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-11/+57
* linux-nat.c (in_pid_list_p): New. (linux_record_stopped_pid): Delete. (lin_lwp_attach_lwp): Check if PTRACE_ATTACH failed because we're already attached to the LWP. Return an indication if so. (linux_nat_filter_event): Adjust. * linux-thread-db.c (attach_thread): Handle lin_lwp_attach_lwp returning an indication to ignore this thread.
2011-08-262011-08-26 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-14/+10
* linux-nat.c (linux_child_follow_fork): Don't set lp->resumed on either the parent or the child forks. Rename a couple locals.
2011-08-262011-08-26 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-21/+20
gdb/ * linux-nat.c (wait_lwp): Avoid assuming errno is preserved by a library call. Avoid reading the `status' local if all waitpid calls failed.
2011-08-24Move common linux procfs code to common/Luis Machado1-28/+1
2011-07-212011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>Kwok Yeung1-140/+2
gdb/ * defs.h: Add guard against inclusion in gdbserver. (struct ptid, ptid_t): Move to common/ptid.h. (xfree, xzalloc, xasprintf, xvasprintf, xstrprintf, xstrvprintf, xsnprintf, internal_error): Move to common/common-utils.h. (nomem): Delete. * gdb_assert.h: Move into common/ sub-directory. * gdb_locale.h: Ditto. * gdb_dirent.h: Ditto. * inferior.h (minus_one_ptid, null_ptid, ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid): Move into common/ptid.h. * xml-support.c (xml_escape_text): Move into common/xml-utils.c. (gdb_xml_create_parser_and_cleanup_1, xml_fetch_context_from_file): Change nomem to malloc_failure. * xml-support.h (xml_escape_text): Move into common/xml-utils.h. * utils.c (nomem): Rename to malloc_failure. (xmalloc, xzalloc, xrealloc, xcalloc, xfree, xstrprintf, xasprintf, xvasprintf, xstrvprintf, xsnprintf): Move to common/common-utils.c. (gdb_buildargv): Change nomem to malloc_failure. * infrun.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid): Move into common/ptid.c. (initialize_infrun): Delete initialization of null_ptid and minus_one_ptid. * linux-nat.c (linux_nat_xfer_osdata): Defer to linux_common_xfer_osdata. * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c, common/ptid.c and common/buffer.c. (HFILES_NO_SRCDIR): Add common/common-utils.h, common/xml-utils.h, common/ptid.h, common/buffer.h and common/linux-osdata.h. (COMMON_OBS): Add xml-utils.o, common-utils.o, buffer.o and ptid.o. (common-utils.o, xml-utils.o, ptid.o, buffer.o, linux-osdata.o): New rules. * common/gdb_assert.h: New. * common/gdb_dirent.h: New. * common/gdb_locale.h: New. * common/buffer.c: New. * common/buffer.h: New. * common/ptid.c: New. * common/ptid.h: New. * common/xml-utils.c: New. * common/xml-utils.h: New. * common/common-utils.c: New. * common/common-utils.h: New. * common/linux-osdata.c: New. * common/linux-osdata.h: New. * config/alpha/alpha-linux.mh (NATDEPFILES): Add linux-osdata.o. * config/arm/linux.mh (NATDEPFILES): Ditto. * config/i386/linux.mh (NATDEPFILES): Ditto. * config/i386/linux64.mh (NATDEPFILES): Ditto. * config/ia64/linux.mh (NATDEPFILES): Ditto. * config/m32r/linux.mh (NATDEPFILES): Ditto. * config/m68k/linux.mh (NATDEPFILES): Ditto. * config/mips/linux.mh (NATDEPFILES): Ditto. * config/pa/linux.mh (NATDEPFILES): Ditto. * config/powerpc/linux.mh (NATDEPFILES): Ditto. * config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto. * config/s390/s390.mh (NATDEPFILES): Ditto. * config/sparc/linux.mh (NATDEPFILES): Ditto. * config/sparc/linux64.mh (NATDEPFILES): Ditto. * config/xtensa/linux.mh (NATDEPFILES): Ditto. gdbserver/ * linux-low.c (compare_ints, unique, list_threads, show_process, linux_core_of_thread): Delete. (linux_target_ops): Change linux_core_of_thread to linux_common_core_of_thread. (linux_qxfer_osdata): Defer to linux_common_xfer_osdata. * utils.c (malloc_failure): Change type of argument. (xmalloc, xrealloc, xcalloc, xsnprintf): Delete. * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c, common/linux-osdata.c, common/ptid.c and common/buffer.c. (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o. (IPA_OBJS): Add common-utils-ipa.o. (ptid_h, linux_osdata_h): New macros. (server_h): Add common/common-utils.h, common/xml-utils.h, common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and common/ptid.h. (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o): New rules. (linux-low.o): Add common/linux-osdata.h as a dependency. * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets. * configure.ac: Add AC_HEADER_DIRENT check. * config.in: Regenerate. * configure: Regenerate. * remote-utils.c (xml_escape_text): Delete. (buffer_grow, buffer_free, buffer_init, buffer_finish, buffer_xml_printf): Move to common/buffer.c. * server.c (main): Remove call to initialize_inferiors. * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid, ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text, internal_error, gdb_assert, gdb_assert_fail): Delete. (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish, buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to common/buffer.h. * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid, initialize_inferiors): Delete.
2011-06-062011-06-06 Pedro Alves <pedro@codesourcery.com>Pedro Alves1-56/+4
gdb/ * infcall.c (run_inferior_call): Don't mask async. Instead force a synchronous wait, if the target can async. * target.h (struct target_ops): Delete to_async_mask. (target_async_mask): Delete. * target.c (update_current_target): Delete references to to_async_mask. * linux-nat.c (linux_nat_async_mask_value): Delete. (linux_nat_is_async_p, linux_nat_can_async_p): Remove references to linux_nat_async_mask_value. (linux_nat_async_mask): Delete. (linux_nat_async, linux_nat_close): Remove references to linux_nat_async_mask_value. * record.c (record_async_mask_value): Delete. (record_async): Remove references to record_async_mask_value. (record_async_mask): Delete. (record_can_async_p, record_is_async_p): Remove references to record_async_mask_value. (init_record_ops, init_record_core_ops): Remove references to record_async_mask. * remote.c (remote_async_mask_value): Delete. (init_remote_ops): Remove reference to remote_async_mask. (remote_can_async_p, remote_is_async_p): Remove references to remote_async_mask_value. (remote_async): Remove references to remote_async_mask_value. (remote_async_mask): Delete. * infrun.c (fetch_inferior_event): Don't claim registers changed if the current thread is already not executing.
2011-05-30gdb/Jan Kratochvil1-1/+1
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
2011-05-27gdb/Jan Kratochvil1-10/+85
Fix PR 10970, PR 12702. * linux-nat.c (linux_lwp_is_zombie): New function. (wait_lwp): Initialize status. New variable prev_mask. Block signals. Check for linux_lwp_is_zombie. Use WNOHANG and sigsuspend. gdb/testsuite/ * gdb.threads/leader-exit.c: New file. * gdb.threads/leader-exit.exp: New file.
2011-05-18gdb/Jan Kratochvil1-0/+12
* linux-nat.c (kill_callback): Use SIGKILL first. gdb/testsuite/ * gdb.base/kill-after-signal.c: New file. * gdb.base/kill-after-signal.exp: New file.
2011-05-13 * linux-nat.c (debug_linux_nat_async): Delete.Doug Evans1-26/+8
Replace all references to use debug_linux_nat instead. (show_debug_linux_nat_async): Delete. (sigchld_handler): Call ui_file_write_async_safe instead of fprintf_unfiltered. (_initialize_linux_nat): Remove `set debug lin-lwp-async'. * ui-file.c (struct ui_file): New member to_write_async_safe. (null_file_write_async_safe): New function. (ui_file_write_async_safe): New function. (set_ui_file_write_async_safe): New function. (ui_file_new): Initialize to_write_async_safe. (stdio_file_write_async_safe): New function. (struct stdio_file): New member fd. (stdio_file_new): Initialize to_write_async_safe, fd. (stdio_file_read, stdio_file_isatty): New stdio->fd instead of calling fileno. * ui-file.h (ui_file_write_async_safe_ftype): New typedef. (set_ui_file_write_async_safe): Declare. (ui_file_write_async_safe): Declare. doc/ * gdb.texinfo (Completion): Update example. (Debugging Output): Delete `set/show debug lin-lwp-async'.
2011-05-09 * linux-nat.c (lin_lwp_attach_lwp): For !WIPSTOPPED case,Doug Evans1-1/+4
adding missing call to restore_child_signals_mask.
2011-04-29 * linux-nat.c (linux_child_remove_fork_catchpoint)Pedro Alves1-0/+21
(linux_child_remove_vfork_catchpoint) (linux_child_remove_exec_catchpoint): New functions. (linux_target_install_ops): Install them.
2011-04-27 * target.h (struct target_ops): Remove to_notice_signals;Ulrich Weigand1-26/+34
add to_pass_signals. (target_notice_signals): Remove. (target_pass_signals): Add prototype. * target.c (update_current_target): Remove to_notice_signals; mention to_pass_signals. (target_pass_signals): New function. (debug_to_notice_signals): Remove. (setup_target_debug): Do not install debug_to_notice_signals. * infrun.c (signal_pass): New global. (resume): Call target_pass_signals. (handle_inferior_event): Report all signals while stepping over non-steppable watchpoint. Reset trap_expected to ensure breakpoints are re-inserted when stepping over a signal handler. (signal_cache_update): New function. (signal_stop_update): Call it. (signal_print_update): Likewise. (signal_pass_update): Likewise. (handle_command): Call signal_cache_update and target_pass_signals instead of target_notice_signals. (_initialize_infrun): Initialize signal_pass. * linux-nat.c (pass_mask): New global. (linux_nat_pass_signals): New function. (linux_nat_create_inferior): Report all signals initially. (linux_nat_attach): Likewise. (linux_nat_resume): Use pass_mask to decide whether to directly handle an inferior signal. (linux_nat_wait_1): Likewise. (linux_nat_add_target): Install to_pass_signals callback. * nto-procfs.c (notice_signals): Remove. (procfs_resume): Do not call notice_signals. (procfs_notice_signals): Remove. (procfs_pass_signals): New function. (init_procfs_ops): Install to_pass_signals callback instead of to_notice_signals callback. (_initialize_procfs): Report all signals initially. * procfs.c (procfs_notice_signals): Remove. (procfs_pass_signals): New function. (procfs_target): Install to_pass_signals callback instead of to_notice_signals callback. (register_gdb_signals): Remove. (procfs_debug_inferior): Report all signals initially. (procfs_init_inferior): Remove redundant register_gdb_signals call. * remote.c (remote_pass_signals): Add numsigs and pass_signals parameters; use them instead of calling signal_..._state routines. (remote_notice_signals): Remove. (remote_start_remote): Report all signals initially. (remote_resume): Do not call remote_pass_signals. (_initialize_remote): Install to_pass_signals callback instead of to_notice_signals callback.
2011-04-26gdb/Yao Qi1-38/+1
* linux-nat.c: Move common macros to ... Include linux-ptrace.h. * common/linux-ptrace.h: ... here. New. gdb/gdbserver/ * linux-low.c: Move common macros to linux-ptrace.h. Include linux-ptrace.h. * Makefile.in (linux_ptrace_h): New. (linux-low.o): Depends on linux-ptrace.h.
2011-03-09 * cli/cli-cmds.c (shell_escape): Use lbasename.Pedro Alves1-1/+1
* coffread.c (coff_start_symtab): Constify parameter. (complete_symtab): Constify `name' parameter. (coff_symtab_read): Constify `filestring' local. (coff_getfilename): Constify return and `result' local. Use lbasename. * fbsd-nat.c (fbsd_make_corefile_notes): Use lbasename. * linux-fork.c (info_checkpoints_command): Use lbasename. * linux-nat.c (linux_nat_make_corefile_notes): Use lbasename. * minsyms.c (lookup_minimal_symbol): Use lbasename. * nto-tdep.c (nto_find_and_open_solib): Use lbasename. * procfs.c (procfs_make_note_section): Use lbasename. * tui/tui-io.c (printable_part): Constity return and parameter. Use lbasename. (print_filename): Constify parameters, and local `s'. (tui_rl_display_match_list): Constify local `temp'.
2011-03-022011-03-02 Michael Snyder <msnyder@vmware.com>Michael Snyder1-3/+3
* linux-nat.c (linux_nat_xfer_partial): Preserve errno around a function call.
2011-03-012011-02-28 Michael Snyder <msnyder@vmware.com>Michael Snyder1-5/+2
* linux-nat.c (linux_handle_extended_wait): Delete unused variable.
2011-02-272011-02-27 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+1
* darwin-nat-info.c: Fix comment typo. * dwarf2expr.h: Ditto. * fbsd-nat.c: Ditto. * fbsd-nat.h: Ditto. * frame-unwind.h: Ditto. * frame.h: Ditto. * hppa-hpux-tdep.c: Ditto. * i386-linux-nat.c: Ditto. * linux-nat.c: Ditto. * nbsd-nat.c: Ditto. * nbsd-nat.h: Ditto. * ppc-linux-tdep.c: Ditto. * serial.c: Ditto. * ui-file.h: Ditto. * tui/tui-winsource.c: Ditto.
2011-02-262011-02-26 Michael Snyder <msnyder@vmware.com>Michael Snyder1-4/+4
* linux-low.c (linux_nat_xfer_osdata): Rename local variable so that it does not shadow a function parameter.
2011-02-082011-02-08 Michael Snyder <msnyder@vmware.com>Michael Snyder1-1/+1
* linux-nat.c (linux_nat_filter_event): Fix typo in comment.
2011-01-19gdbTom Tromey1-0/+38
PR mi/8618: * thread.c (free_thread): Free 'name'. (print_thread_info): Emit thread name. Change CLI output. (thread_name_command): New function. (do_captured_thread_select): Emit newline. (_initialize_thread): Register 'thread name' command. * target.h (struct target_ops) <to_thread_name>: New field. (target_thread_name): New macro. * target.c (update_current_target): Handle to_thread_name. * python/py-infthread.c (thpy_get_name): New function. (thpy_set_name): Likewise. (thread_object_getset): Add "name". * linux-nat.c (linux_nat_thread_name): New function. (linux_nat_add_target): Set to_thread_name. * gdbthread.h (struct thread_info) <name>: New field. gdb/doc * gdb.texinfo (Threads): Document thread name output and `thread name' command. (Threads In Python): Document Thread.name attribute. (GDB/MI Thread Commands): Document thread attributes. gdb/testsuite * gdb.python/py-infthread.exp: Add thread tests.
2011-01-112010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>Thiago Jung Bauermann1-12/+10
Convert hardware watchpoints to use breakpoint_ops. gdb/ * breakpoint.h (breakpoint_ops) <insert>: Rename to... <insert_location>: ... this. Return int instead of void. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. (breakpoint_ops) <remove>: Rename to... <remove_location>: ... this. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. * breakpoint.c (insert_catchpoint): Delete function. (insert_bp_location): Call the watchpoint or catchpoint's breakpoint_ops.insert method. (remove_breakpoint_1): Call the watchpoint or catchpoint's breakpoint_ops.remove method. (insert_watchpoint, remove_watchpoint): New functions. (watchpoint_breakpoint_ops): New structure. (watch_command_1): Initialize the OPS field. * inf-child.c (inf_child_insert_fork_catchpoint) (inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint) (inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint) (inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint): Delete functions. (inf_child_target): Remove initialization of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint. * target.c (update_current_target): Change default implementation of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint to return_one. (debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint) (debug_to_insert_exec_catchpoint): Report return value. * target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint) (to_insert_exec_catchpoint): Change declaration to return int instead of void. gdb/testsuite/ * gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint type is not supported. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise.
2011-01-092011-01-08 Michael Snyder <msnyder@vmware.com>Michael Snyder1-23/+23
* h8300-tdep.c: Comment cleanup, mostly periods and spaces. * hppa-hpux-tdep.c: Ditto. * hppa-linux-nat.c: Ditto. * hppa-linux-tdep.c: Ditto. * hppanbsd-tdep.c: Ditto. * hppa-tdep.c: Ditto. * hppa-tdep.h: Ditto. * hpux-thread.c: Ditto. * i386-cygwin-tdep.c: Ditto. * i386-darwin-nat.c: Ditto. * i386gnu-nat.c: Ditto. * i386-linux-nat.c: Ditto. * i386-linux-tdep.c: Ditto. * i386-nat.c: Ditto. * i386-nat.h: Ditto. * i386nbsd-tdep.c: Ditto. * i386-sol2-nat.c: Ditto. * i386-stub.c: Ditto. * i386-tdep.c: Ditto. * i386-tdep.h: Ditto. * i387-tdep.c: Ditto. * ia64-linux-nat.c: Ditto. * ia64-linux-tdep.c: Ditto. * ia64-tdep.c: Ditto. * infcall.c: Ditto. * infcall.h: Ditto. * infcmd.c: Ditto. * inferior.c: Ditto. * inferior.h: Ditto. * infloop.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * interps.c: Ditto. * interps.h: Ditto. * iq2000-tdep.c: Ditto. * irix5-nat.c: Ditto. * jit.c: Ditto. * jit.h: Ditto. * jv-exp.y: Ditto. * jv-lang.c: Ditto. * jv-lang.h: Ditto. * jv-typeprint.c: Ditto. * jv-valprint.c: Ditto. * language.c: Ditto. * language.h: Ditto. * linespec.c: Ditto. * linux-fork.c: Ditto. * linux-nat.c: Ditto. * linux-thread-db.c: Ditto. * lm32-tdep.c: Ditto.
2011-01-072011-01-07 Michael Snyder <msnyder@vmware.com>Michael Snyder1-6/+5
* ax-gdb.c: Adjust some long output strings. * breakpoint.c: Ditto. * charset.c: Ditto. * cp-abi.c: Ditto. * infcall.c: Ditto. * infrun.c: Ditto. * linux-nat.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto.
2011-01-052011-01-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-65/+95
* addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-2/+2
2010-11-28gdb/Jan Kratochvil1-6/+6
Rename and move inferior_thread_state and inferior_status. * gdbthread.h (struct thread_control_state): New struct, move fields step_range_start, step_range_end, step_frame_id, step_stack_frame_id, trap_expected, proceed_to_finish, in_infcall, step_over_calls, stop_step and stop_bpstat here from struct thread_info. (struct thread_suspend_state): New struct, move field stop_signal here from struct thread_info. (struct thread_info): Move the fields above from this struct. * inferior.h: Move the inferior_thread_state and inferior_status declarations comment to their definitions at infrun.c. (struct inferior_control_state): New struct, move field stop_soon from struct inferior here. (struct inferior_suspend_state): New empty struct. (struct inferior): New fields control and suspend. Move out field stop_soon. * infrun.c (struct inferior_thread_state): Rename to ... (infcall_suspend_state): ... here. Replace field stop_signal by fields thread_suspend and inferior_suspend. (save_inferior_thread_state): Rename to ... (save_infcall_suspend_state): ... here. New variable inf. Update the code for new fields. (restore_inferior_thread_state): Rename to ... (restore_infcall_suspend_state): ... here. New variable inf. Update the code for new fields. (do_restore_inferior_thread_state_cleanup): Rename to ... (do_restore_infcall_suspend_state_cleanup): ... here. (make_cleanup_restore_inferior_thread_state): Rename to ... (make_cleanup_restore_infcall_suspend_state): ... here. (discard_inferior_thread_state): Rename to ... (discard_infcall_suspend_state): ... here. (get_inferior_thread_state_regcache): Rename to ... (get_infcall_suspend_state_regcache): ... here. (struct inferior_status): Rename to ... (struct infcall_control_state): ... here. Replace fields step_range_start, step_range_end, step_frame_id, step_stack_frame_id, trap_expected, proceed_to_finish, in_infcall, step_over_calls, stop_step, stop_bpstat and stop_soon by fields thread_control and inferior_control. (save_inferior_status): Rename to ... (save_infcall_control_state): ... here. Update the code for new fields. (restore_inferior_status): Rename to ... (restore_infcall_control_state): ... here. Update the code for new fields. (do_restore_inferior_status_cleanup): Rename to ... (do_restore_infcall_control_state_cleanup): ... here. (make_cleanup_restore_inferior_status): Rename to ... (make_cleanup_restore_infcall_control_state): ... here. (discard_inferior_status): Rename to ... (discard_infcall_control_state): ... here. * alpha-tdep.c, breakpoint.c, dummy-frame.c, dummy-frame.h, exceptions.c, fbsd-nat.c, gdbthread.h, infcall.c, infcmd.c, inferior.c, inferior.h, infrun.c, linux-nat.c, mi/mi-interp.c, mips-tdep.c, procfs.c, solib-irix.c, solib-osf.c, solib-spu.c, solib-sunos.c, solib-svr4.c, thread.c, windows-nat.c: Update all the references to the moved fields and renamed functions.
2010-11-02gdb/Jan Kratochvil1-10/+4
Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <pedro@codesourcery.com> * gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ Revert: 2010-10-17 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
2010-10-17gdb/Jan Kratochvil1-4/+10
* gdbthread.h (currently_stepping): New declaration. * infrun.c (currently_stepping): Remove the forward declaration. (currently_stepping): Make it global. * linux-nat.c (resume_callback) <lp->stopped && lp->status == 0>: New variables tp and step, initialized them. Pass STEP to to_resume. Print also possibly "PTRACE_SINGLESTEP" if STEP. Initialize LP->STEP. * remote.c (currently_stepping_callback): New. (remote_vcont_resume) <ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid)>: New variable tp. Call currently_stepping_callback and step such thread. gdb/testsuite/ * gdb.threads/sigstep-threads.exp: New file. * gdb.threads/sigstep-threads.c: New file.
2010-09-06gdb/Jan Kratochvil1-6/+10
* corelow.c (core_open): Use target_signal_from_host if CORE_GDBARCH is NULL. * fork-child.c (startup_inferior) <resume_signal>: Use enum target_signal type. * linux-nat.c (linux_nat_resume): Use target_signal_to_host before calling strsignal. Use enum target_signal type for saved_signo. (linux_handle_extended_wait) <signo>: Use enum target_signal type. (linux_nat_wait_1): Use enum target_signal type for signo. Use target_signal_to_host before calling strsignal. * remote-m32r-sdi.c (m32r_wait, m32r_detach): Replace 0 by TARGET_SIGNAL_0. gdb/gdbserver/ * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
2010-09-022010-09-02 Yao Qi <yao@codesourcery.com>Yao Qi1-1/+1
* linux-nat.c (status_to_str): Use WTERMSIG to extract the signal number from a WIFSIGNALED status.
2010-08-31gdb/Jan Kratochvil1-3/+1
Code cleanup. * defs.h (find_memory_region_ftype): New typedef. (exec_set_find_memory_regions): Use it. * exec.c (exec_set_find_memory_regions): Use find_memory_region_ftype. * fbsd-nat.c (fbsd_find_memory_regions): Likewise. * gcore.c (objfile_find_memory_regions): Likewise. * gnu-nat.c (gnu_find_memory_regions): Likewise. * linux-nat.c (linux_nat_find_memory_regions): Likewise. * procfs.c (iterate_over_mappings_cb_ftype): Remove. (iterate_over_mappings): Rename iterate_over_mappings_cb_ftype to find_memory_region_ftype. (insert_dbx_link_bpt_in_region): Likewise. (iterate_over_mappings): Likewise. Drop the comment part about the function prototype. (find_memory_regions_callback): Use find_memory_region_ftype. (proc_find_memory_regions): Likewise. (info_mappings_callback): Rename iterate_over_mappings_cb_ftype to find_memory_region_ftype. * target.c (dummy_find_memory_regions): Use find_memory_region_ftype. * target.h (struct target_ops) <to_find_memory_regions>: Likewise.
2010-08-28gdb/Jan Kratochvil1-4/+4
Code cleanup. * linux-nat.c (pull_pid_from_list): Rename status to statusp. (my_waitpid): Likewise.
2010-07-27gdb/Jan Kratochvil1-9/+18
* linux-nat.c (linux_nat_lp_status_is_event): New function. (count_events_callback, select_event_lwp_callback) (cancel_breakpoints_callback, linux_nat_wait_1): Use it.
2010-07-27gdb/Jan Kratochvil1-7/+30
* ia64-linux-nat.c (ia64_linux_status_is_event): New function. (_initialize_ia64_linux_nat): Install it. * linux-nat.c (sigtrap_is_event, linux_nat_status_is_event) (linux_nat_set_status_is_event): New. (stop_wait_callback, count_events_callback, select_event_lwp_callback) cancel_breakpoints_callback, linux_nat_filter_event) (linux_nat_wait_1): Use linux_nat_status_is_event. * linux-nat.h (linux_nat_set_status_is_event): New prototype. gdb/testsuite/ * gdb.threads/ia64-sigill.exp: New file. * gdb.threads/ia64-sigill.c: New file.
2010-07-25gdb/Jan Kratochvil1-6/+5
* linux-nat.c (linux_nat_do_thread_registers): Convert STOP_SIGNAL to the host signal first.
2010-07-23gdb/Jan Kratochvil1-1/+0
* linux-nat.c (cancel_breakpoint): Remove unused forward declaration.
2010-07-20gdb/Jan Kratochvil1-0/+17
* linux-nat.c (linux_handle_extended_wait): Handle case when event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP.
2010-07-20gdb/Jan Kratochvil1-2/+5
Code cleanup. * linux-nat.c (linux_nat_wait_1): Reset STATUS after calling linux_nat_wait_1. Use always LP->STATUS afterwards.
2010-07-18gdb/Jan Kratochvil1-1/+3
* linux-nat.c (linux_handle_extended_wait): Move variable new_lp into a more inner block. Remove its unused declaration initializer.
2010-07-07 * linux-nat.c (linux_nat_do_thread_registers): Use section sizeUlrich Weigand1-29/+28
from gdbarch_core_regset_sections also for .reg if present. * amd64-linux-tdep.c (amd64_linux_regset_sections): Fix incorrect section size for .reg. * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise. (ppc_linux_vmx_regset_sections): Likewise. (ppc_linux_fp_regset_sections): Likewise. (ppc64_linux_vsx_regset_sections): New variable. (ppc64_linux_vmx_regset_sections): Likewise. (ppc64_linux_fp_regset_sections): Likewise. (ppc_linux_init_abi): Install core_regset_section lists appropriate for current word size.
2010-07-01 * breakpoint.c (update_watchpoint, _initialize_breakpoint): RemovePedro Alves1-1/+1
unnecessary space in string. * filesystem.c (_initialize_filesystem): Ditto. * frame.c (_initialize_frame): Ditto. * infcmd.c (step_once): Ditto. * infrun.c (_initialize_infrun): Ditto. * linux-nat.c (linux_child_follow_fork): Ditto. * maint.c (maintenance_deprecate): Ditto. * memattr.c (_initialize_mem): Ditto. * mips-tdep.c (_initialize_mips_tdep): Ditto. * monitor.c (monitor_open): Ditto. * procfs.c (procfs_xfer_memory): Ditto. * reverse.c (bookmarks_info): Ditto. * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Ditto. * stack.c (_initialize_stack): Ditto. * tracepoint.c (_initialize_tracepoint): Ditto. * xtensa-tdep.c (xtensa_supply_gregset, xtensa_regset_from_core_section): Ditto.
2010-06-182010-06-18 Stan Shebs <stan@codesourcery.com>Stan Shebs1-0/+39
* osdata.c (get_osdata): Warn separately if target does not report type list. (info_osdata_command): Allow empty type, report error if target does not return available types of OS data. * linux-nat.c (linux_nat_xfer_osdata): Report list of OS data types if no annex supplied. * gdb.texinfo (Operating System Auxiliary Information): Describe "info os" when no arguments given.
2010-05-28gdb/Jan Kratochvil1-4/+10
* linux-nat.c (linux_nat_core_of_thread_1): Fix crash on invalid CONTENT. gdb/gdbserver/ * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT. New comment.
2010-05-28gdb/Jan Kratochvil1-1/+7
* linux-nat.c (linux_nat_wait_1): Do not call linux_nat_core_of_thread_1 on TARGET_WAITKIND_EXITED or TARGET_WAITKIND_SIGNALLED.
2010-05-142010-05-14 Michael Snyder <msnyder@vmware.com>Michael Snyder1-57/+70
* jv-lang.c: White space. * jv-typeprint.c: White space. * jv-valprint.c: White space. * language.c: White space. * libunwind-frame.c: White space. * linespec.c: White space. * linux-nat.c: White space. * linux-record.c: White space. * linux-thread-db.c: White space.
2010-05-052010-05-05 Michael Snyder <msnyder@vmware.com>Michael Snyder1-17/+0
* linux-nat.c (top level): Delete unused global variable. (linux_tracefork_child): Delete unused variable. (linux_child_follow_fork): Delete unused variable. (linux_nat_detach): Delete unused variable. (linux_handle_extended_wait): Delete unused variable. (linux_nat_has_pending_sigint): Delete unused variable. (linux_nat_find_memory_regions): Delete unused variable. (linux_nat_make_corefile_notes): Delete unused variables. (linux_nat_info_proc_cmd): Delete unused variable. (linux_proc_pending_signals): Delete unused variable. (linux_nat_stop_lwp): Delete unused variables. (_initialize_linux_nat): Delete unused variable.
2010-04-05 Remove remaining "%ll" uses.Pierre Muller1-2/+2
* go32-nat.c (go32_pte_for_address): Replace "0x%llx" using hex_string call. * rs6000-nat.c (rs6000_ptrace64): Idem. * solib-pa64.c (pa64_current_sos): Idem. * solib-spu.c (spu_current_sos): Idem. * linux-nat.c (linux_nat_find_memory_regions): Replace "%lld" using plongest call. * nto-procfs.c (procfs_meminfo): Replace "0x%016llx" using phex (VAR, 8) call. * sh64-tdep.c (sh64_show_media_regs): Idem.
2010-03-17 * linux-nat.c (linux_nat_detach): Check debug_linux_nat.Tom Tromey1-4/+5
2010-02-24 * inferior.h (ptid_match): Declare.Pedro Alves1-27/+0
* infrun.c (ptid_match): New. * remote.c (queued_stop_reply): Rewrite and use ptid_match. (handle_notification): Add debug output. * linux-nat.c (ptid_match): Delete.