aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread-db.c
AgeCommit message (Collapse)AuthorFilesLines
2004-11-14 * linux-thread-db.c: New file, renamed from thread-db.c.Daniel Jacobowitz1-1370/+0
* thread-db.c: Remove. * Makefile.in (linux-thread-db.o): Rename from thread-db.o rule. * config/alpha/alpha-linux.mh (NATDEPFILES): Rename thread-db.o to linux-thread-db.o. * config/arm/linux.mh (NATDEPFILES): Likewise. * config/i386/linux.mh (NATDEPFILES): Likewise. * config/i386/linux64.mh (NATDEPFILES): Likewise. * config/ia64/linux.mh (NATDEPFILES): Likewise. * config/m32r/linux.mh (NATDEPFILES): Likewise. * config/m68k/linux.mh (NATDEPFILES): Likewise. * config/mips/linux.mh (NATDEPFILES): Likewise. * config/pa/linux.mh (NATDEPFILES): Likewise. * config/powerpc/linux.mh (NATDEPFILES): Likewise. * config/powerpc/ppc64-linux.mh (NATDEPFILES): Likewise. * config/s390/s390.mh (NATDEPFILES): Likewise. * config/sparc/linux.mh (NATDEPFILES): Likewise. * config/sparc/linux64.mh (NATDEPFILES): Likewise.
2004-10-082004-10-08 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-3/+3
* target.h (struct target_ops): Rename to_xfer_memory to deprecated_xfer_memory. * target.c: Update. (deprecated_debug_xfer_memory): Rename debug_to_xfer_memory. * wince.c: Update. * win32-nat.c: Update. * v850ice.c: Update. * uw-thread.c: Update. * thread-db.c: Update. * sol-thread.c: Update. * remote.c: Update. * remote-vx.c: Update. * remote-st.c: Update. * remote-sim.c: Update. * remote-sds.c: Update. * remote-rdp.c: Update. * remote-rdi.c: Update. * remote-mips.c: Update. * remote-m32r-sdi.c: Update. * remote-e7000.c: Update. * procfs.c: Update. * ppc-bdm.c: Update. * nto-procfs.c: Update. * monitor.c: Update. * linux-nat.c: Update. * inftarg.c: Update. * hpux-thread.c: Update. * go32-nat.c: Update. * gnu-nat.c: Update. * exec.c: Update. * corelow.c: Update. * bsd-kvm.c: Update. * aix-thread.c: Update.
2004-09-142004-09-14 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-8/+2
* thread-db.c (thread_db_new_objfile): Assume that there is a child process.
2004-09-082004-09-08 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-35/+5
* thread-db.c (keep_thread_db): Delete. (thread_db_new_objfile, thread_db_create_inferior) (thread_db_mourn_inferior): Simplify assuming !keep_thread_db.
2004-07-222004-07-21 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-1/+1
Use regcache_raw_supply instead of supply_register. * regcache.h (supply_register): Delete declaration. * regcache.c (supply_register): Delete function. * wince.c (do_child_fetch_inferior_registers): Update. * win32-nat.c (do_child_fetch_inferior_registers) (fetch_elf_core_registers): Update. * v850ice.c (v850ice_fetch_registers): Update. * thread-db.c (thread_db_store_registers): Update. * sol-thread.c (sol_thread_store_registers): Update. * shnbsd-tdep.c (shnbsd_supply_reg): Update. * rs6000-nat.c (fetch_register): Update. * rom68k-rom.c (rom68k_supply_one_register): Update. * remote.c (remote_wait, remote_async_wait): Update. * remote-st.c (get_hex_regs): Update. * remote-sim.c (gdbsim_fetch_register): Update. * remote-sds.c (sds_fetch_registers): Update. * remote-rdp.c (remote_rdp_fetch_register): Update. * remote-rdi.c (arm_rdi_fetch_registers): Update. * remote-mips.c (mips_wait, mips_fetch_registers): Update. * remote-m32r-sdi.c (m32r_fetch_register): Update. * remote-hms.c (init_hms_cmds): Update. * remote-est.c (init_est_cmds): Update. * remote-e7000.c (get_hex_regs, fetch_regs_from_dump) (e7000_fetch_registers, sub2_from_pc, e7000_wait): Update. * ppcnbsd-tdep.c (ppcnbsd_supply_reg, ppcnbsd_supply_fpreg): Update. * ppc-linux-nat.c (fetch_altivec_register, fetch_spe_register) (fetch_register, supply_vrregset, supply_vrregset) (fetch_spe_registers): Update. * ppc-bdm.c (bdm_ppc_fetch_registers): Update. * monitor.c (monitor_supply_register): Update. * mipsv4-nat.c (supply_gregset, supply_fpregset): Update. * mipsnbsd-tdep.c (mipsnbsd_supply_reg) (mipsnbsd_supply_fpreg): Update. * mips-nat.c (fetch_inferior_registers) (fetch_core_registers): Update. * mips-linux-tdep.c (supply_32bit_reg, supply_gregset) (supply_fpregset, mips64_supply_gregset) (mips64_supply_fpregset): Update. * m68klinux-nat.c (fetch_register, supply_gregset) (supply_fpregset): Update. * m68k-tdep.c (supply_gregset, supply_fpregset): Update. * m32r-rom.c (init_m32r_cmds, init_mon2000_cmds): Update. * lynx-nat.c (fetch_inferior_registers, fetch_core_registers): Update. * irix5-nat.c (supply_gregset, supply_fpregset): Update. * infptrace.c (fetch_register): Update. * ia64-linux-nat.c (supply_gregset, supply_fpregset): Update. * ia64-aix-nat.c (supply_gregset, supply_fpregset): Update. * i386gnu-nat.c (fetch_fpregs, supply_gregset) (gnu_fetch_registers, gnu_store_registers): Update. * i386-nto-tdep.c (i386nto_supply_gregset): Update. * i386-linux-nat.c (fetch_register, supply_gregset) (dummy_sse_values): Update. * hpux-thread.c (hpux_thread_fetch_registers): Update. * hppah-nat.c (fetch_register): Update. * hppa-linux-nat.c (fetch_register, supply_gregset) (supply_fpregset): Update. * go32-nat.c (fetch_register): Update. * dve3900-rom.c (fetch_bitmapped_register) (_initialize_r3900_rom): Update. * cris-tdep.c (supply_gregset): Update. * abug-rom.c (init_abug_cmds): Update. * core-aout.c (fetch_core_registers): Update. * armnbsd-nat.c (supply_gregset, supply_fparegset) (fetch_register, fetch_fp_register): Update. * arm-linux-nat.c (fetch_nwfpe_single, fetch_nwfpe_none) (fetch_nwfpe_extended, fetch_fpregister, fetch_fpregs) (fetch_register, fetch_regs, supply_gregset, supply_fpregset): Update. * alphanbsd-tdep.c (fetch_core_registers): Update. * alpha-tdep.c (alpha_supply_int_regs, alpha_supply_fp_regs): Update. * alpha-nat.c (fetch_osf_core_registers) (fetch_osf_core_registers, fetch_osf_core_registers): Update. * aix-thread.c (supply_gprs64, supply_reg32, supply_fprs) (supply_sprs64, supply_sprs32, fetch_regs_kernel_thread): Update.
2004-06-072004-06-07 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-2/+8
* thread-db.c (thread_get_info_callback): Fill in the thread_info struct if one exists, even if we are dealing with a zombie thread.
2004-06-042004-06-04 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-3/+37
* infrun.c (handle_inferior_event): Don't treat an invalid ptid as a new thread event. * thread_db.c (thread_get_info_callback): If the thread is a zombie, return TD_THR_ZOMBIE. * (thread_from_lwp): If thread_get_info_callback returns TD_THR_ZOMBIE, check if the thread is still on the thread list and return a -1 ptid if not found. (thread_db_wait): If thread_from_lwp returns a -1 ptid, then change the status to TARGET_WAITKIND_SPURIOUS.
2004-05-252004-05-25 Andrew Cagney <cagney@gnu.org>Andrew Cagney1-2/+3
* target.h (struct target_ops): Add from_tty to to_create_inferior. (target_create_inferior, find_default_create_inferior): Update. * infcmd.c (run_command): Update. * wince.c (child_create_inferior): Update. * win32-nat.c (child_create_inferior): Update. * uw-thread.c (uw_thread_create_inferior): Update. * thread-db.c (thread_db_create_inferior): Update. * target.c (debug_to_create_inferior) (find_default_create_inferior): Update. (maybe_kill_then_create_inferior): Update. * sol-thread.c (sol_thread_create_inferior): Update. * remote.c (extended_remote_async_create_inferior) (extended_remote_create_inferior): Update. * remote-vx.c (vx_create_inferior): Update. * remote-st.c (st2000_create_inferior): Update. * remote-sim.c (gdbsim_create_inferior): Update. * remote-sds.c (sds_create_inferior): Update. * remote-rdp.c (remote_rdp_create_inferior): Update. * remote-rdi.c (arm_rdi_create_inferior): Update. * remote-m32r-sdi.c (m32r_create_inferior): Update. * remote-e7000.c (e7000_create_inferior): Update. * procfs.c (procfs_create_inferior): Update. * ocd.c (ocd_create_inferior): Update. * ocd.h (ocd_create_inferior): Update. * nto-procfs.c (procfs_create_inferior): Update. * monitor.c (monitor_create_inferior): Update. * lin-lwp.c (lin_lwp_create_inferior): Update. * inftarg.c (child_create_inferior): Update. * hpux-thread.c (hpux_thread_create_inferior): Update. * gnu-nat.c (gnu_create_inferior): Update.
2004-04-212004-04-21 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-2/+2
* annotate.h (deprecated_annotate_starting_hook) (deprecated_annotate_stopped_hook) (deprecated_annotate_exited_hook) (deprecated_annotate_signal_hook) (deprecated_annotate_signalled_hook): Deprecate. * tracepoint.h (deprecated_create_tracepoint_hook) (deprecated_delete_tracepoint_hook) (deprecated_modify_tracepoint_hook) (deprecated_trace_find_hook) (deprecated_trace_start_stop_hook): Deprecate. * target.h (deprecated_target_new_objfile_hook): Deprecate. * remote.h (deprecated_target_resume_hook) (deprecated_target_wait_loop_hook): Deprecate. * gdbcore.h (deprecated_exec_file_display_hook) (deprecated_file_changed_hook): Deprecate. * frame.h (deprecated_selected_frame_level_changed_hook): Deprecate. * defs.h (deprecated_modify_breakpoint_hook) (deprecated_command_loop_hook, deprecated_show_load_progress) (deprecated_print_frame_info_listing_hook) (deprecated_query_hook, deprecated_warning_hook) (deprecated_flush_hook, deprecated_create_breakpoint_hook) (deprecated_delete_breakpoint_hook) (deprecated_interactive_hook, deprecated_registers_changed_hook) (deprecated_readline_begin_hook, deprecated_readline_hook) (deprecated_readline_end_hook, deprecated_register_changed_hook) (deprecated_memory_changed_hook, deprecated_init_ui_hook) (deprecated_context_hook, deprecated_target_wait_hook) (deprecated_attach_hook, deprecated_detach_hook) (deprecated_call_command_hook, deprecated_set_hook) (deprecated_error_hook, deprecated_error_begin_hook) (deprecated_ui_load_progress_hook): Deprecate. * valops.c, uw-thread.c, utils.c, tui/tui-io.c: Update. * tui/tui-hooks.c, tracepoint.c, top.c, thread-db.c: Update. * target.c, symfile.c, stack.c, sol-thread.c, rs6000-nat.c: Update. * remote.c, remote-mips.c, regcache.c, mi/mi-interp.c: Update. * main.c, interps.c, infcmd.c, hpux-thread.c, frame.c: Update. * exec.c, dsrec.c, d10v-tdep.c, corefile.c, complaints.c: Update. * cli/cli-script.c, cli/cli-setshow.c, breakpoint.c: Update. * annotate.c, aix-thread.c: Update.
2004-03-29 * Makefile.in (linux_nat_h): Update dependencies.Daniel Jacobowitz1-9/+60
* configure.in: Check for <gnu/libc-version.h>. * configure: Regenerate. * config.in: Regenerate. * linux-nat.h: Include "target.h". Add waitstatus field to struct lwp_info. * lin-lwp.c (add_lwp): Initialize waitstatus.kind. (lin_lwp_attach_lwp): Don't attach to LWPs we have already attached to. (lin_lwp_handle_extended): New function. Handle clone events. (wait_lwp): Use lin_lwp_handle_extended. Update comment about thread exit events. (child_wait): Handle clone events. (lin_lwp_wait: Use lin_lwp_handle_extended and handle clone events. * linux-nat.c (linux_enable_event_reporting): Turn on PTRACE_O_TRACECLONE. (linux_handle_extended_wait): Handle clone events. * thread-db.c: Include <gnu/libc-version.h>. (struct private_thread_info): Add dying flag. (enable_thread_event_reporting): Enable TD_DEATH for glibc 2.2 and higher. (attach_thread): Update comments. Handle dying threads. (detach_thread): Set the dying flag. (check_event): Always call attach_thread.
2004-02-29 * thread-db.c (disable_thread_signals): Remove unused function.Daniel Jacobowitz1-21/+0
2003-12-042003-12-02 Roland McGrath <roland@redhat.com>Roland McGrath1-10/+12
* thread-db.c (enable_thread_event): Change return type to td_err_e. Return TD_OK or error code. (enable_thread_event_reporting): Update callers.
2003-11-252003-11-25 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-14/+26
* thread-db.c (enable_thread_event): New function. Ensure that BP is a code address. (enable_thread_event_reporting): Use enable_thread_event.
2003-09-042003-09-04 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-11/+46
* thread-db.c (verbose_dlsym): New function. (thread_db_load): Use verbose_dlsym (thread_db_new_objfile): Print that libthread_db was loaded, and that thread debugging was enabled.
2003-06-052003-06-05 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-39/+48
* thread-db.c (check_event): For create/death event breakpoints, loop through all messages to ensure that we read the message corresponding to the breakpoint we are at.
2003-06-032003-06-03 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-0/+12
* thread-db.c (thread_db_mourn_inferior): Unpush thread target layer if not dealing with a statically-linked threaded program.
2003-05-082003-05-08 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+1
* regcache.h (max_register_size): Delete declaration. * regcache.c (max_register_size): Delete function. (struct regcache_descr): Delete field "max_register_size". (init_regcache_descr, init_legacy_regcache_descr): Assert that all registers fit in MAX_REGISTER_SIZE. (regcache_save): Replace max_register_size with MAX_REGISTER_SIZE. (regcache_restore, regcache_xfer_part, regcache_dump): Ditto. * thread-db.c: Replace max_register_size with MAX_REGISTER_SIZE. * sh-tdep.c, rom68k-rom.c, remote-sim.c, remote-mips.c: Ditto. * remote-e7000.c, monitor.c, mipsv4-nat.c, mips-nat.c: Ditto. * m68klinux-nat.c, lynx-nat.c, irix4-nat.c: Ditto. * hpux-thread.c, hppah-nat.c, hppab-nat.c, hppa-tdep.c: Ditto. * dve3900-rom.c, hppa-tdep.c: Ditto.
2003-04-172003-04-17 Jeff Johnston <jjohnstn@redhat.com>Jeff Johnston1-59/+66
* thread-db.c: Reindented.
2003-02-022003-02-02 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+1
* mips-nat.c (zerobuf): Delete. (fetch_inferior_registers): Alloc local zerobuf. (fetch_core_registers): Alloc local zerobuf. * d10v-tdep.c (show_regs): Don't allocate a dynamic array using MAX_REGISTER_RAW_SIZE or MAX_REGISTER_VIRTUAL_SIZE. * thread-db.c (thread_db_store_registers): Ditto. * sh-tdep.c (sh_do_register): Ditto. * rom68k-rom.c (rom68k_supply_one_register): Ditto. * remote-sim.c (gdbsim_store_register): Ditto. * remote-mips.c (mips_wait, mips_fetch_registers): Ditto. * remote-e7000.c (fetch_regs_from_dump): Ditto. * monitor.c (monitor_supply_register): Ditto. * mipsv4-nat.c (supply_gregset, supply_fpregset): Ditto. * mips-nat.c (fetch_inferior_registers): Ditto. * m68klinux-nat.c (fetch_register): Ditto. * lynx-nat.c (fetch_inferior_registers): Ditto. (fetch_inferior_registers): Ditto. * irix4-nat.c (supply_gregset, supply_fpregset): Ditto. * hpux-thread.c (hpux_thread_fetch_registers): Ditto. (hpux_thread_store_registers): Ditto. * hppah-nat.c (fetch_register): Ditto. * hppab-nat.c (fetch_register): Ditto. * hppa-tdep.c (pa_register_look_aside): Ditto. (pa_print_fp_reg, pa_strcat_fp_reg): Ditto. * dve3900-rom.c (fetch_bitmapped_register): Ditto.
2003-01-142003-01-13 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-1/+2
* ax-gdb.c, c-valprint.c, charset.c, corefile.c: Update copyright. * demangle.c, disasm.c, dwarf2cfi.c, dwarfread.c: Update copyright. * elfread.c, eval.c, expprint.c, expression.h: Update copyright. * f-typeprint.c, findvar.c, gcore.c, gdb_mbuild.sh: Update copyright. * gdbtypes.h, gnu-v2-abi.c, inferior.h, inftarg.c: Update copyright. * language.c, language.h, m32r-tdep.c: Update copyright. * mn10200-tdep.c, scm-lang.c, scm-lang.h: Update copyright. * somsolib.c, somsolib.h, symfile.c, symtab.h: Update copyright. * thread-db.c, typeprint.c, utils.c, valarith.c: Update copyright. * values.c, win32-nat.c, x86-64-linux-nat.c: Update copyright. * x86-64-linux-tdep.c, z8k-tdep.c: Update copyright. * cli/cli-decode.h, config/h8500/tm-h8500.h: Update copyright. Index: mi/ChangeLog 2003-01-13 Andrew Cagney <ac131313@redhat.com> * mi-cmd-env.c: Update copyright.
2003-01-13 * thread-db.c (attach_thread): Prototype.Daniel Jacobowitz1-67/+170
(struct private_thread_info): Remove lwpid. Add thread handle (th), thread information (ti), and valid flags (th_valid, ti_valid). (attach_thread): Move target_pid_to_str call to after the thread is added to GDB's list. Initialize the cache. (thread_get_info_callback, thread_db_map_id2thr) (thread_db_get_info): New functions. (thread_from_lwp, lwp_from_thread, thread_db_fetch_registers) (thread_db_store_registers, thread_db_thread_alive) (thread_db_get_thread_local_address): Use them. (thread_db_pid_to_str): Likewise. Return "Missing" instead of calling error() for threads in unknown state. (clear_lwpid_callback): New function. (thread_db_resume): Use it to clear the cache.
2002-12-132002-12-13 Michael Snyder <msnyder@to-limbo.toronto.redhat.com>Michael Snyder1-5/+9
* thread-db.c (thread_from_lwp): Uniquify error msg. (lwp_from_thread): Ditto. (check_event): Ditto. (find_new_threads_callback): Ditto. (thread_db_pid_to_str): Ditto.
2002-11-232002-11-22 Michael Snyder <msnyder@redhat.com>Michael Snyder1-1/+7
* thread-db.c (thread_db_load): Tell the user what's going on if dlopen fails on libthread_db.
2002-11-122002-11-11 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni1-0/+100
* findvar.c (read_var_value): Reenable TLS code. 2002-11-11 Elena Zannoni <ezannoni@redhat.com> Jim Blandy <jimb@redhat.com> * gdb_thread_db.h (enum): Add TD_NOTALLOC. * target.c (update_current_target): Add to_get_thread_local_address. * target.h (to_get_thread_local_address): Export. (target_get_thread_local_address): Define. (target_get_thread_local_address_p): Define. * thread-db.c: Include solib-svr4.h. (td_thr_tls_get_addr_p): Define. (thread_db_load): Get a pointer to td_thr_tls_get_addr. (thread_db_get_thread_local_address): New function. (init_thread_db_ops): Initialize to_get_thread_local_address. * configure.in: Add test for TD_NOTALLOC in thread_db.h. * configure: Regenerate. * config.in: Regenerate.
2002-11-022002-11-02 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-1/+1
* regcache.h (deprecated_read_register_gen): Rename read_register_gen. (deprecated_write_register_gen): Rename write_register_gen. * i387-tdep.c: Update. * x86-64-linux-nat.c: Update * wince.c: Update. * thread-db.c: Update. * win32-nat.c: Update. * mips-tdep.c: Update. * d10v-tdep.c: Update. * cris-tdep.c: Update. * remote-sim.c: Update. * remote-rdi.c: Update. * remote-rdp.c: Update. * frame.c: Update. * target.c: Update. * blockframe.c: Update. * x86-64-tdep.c: Update. * xstormy16-tdep.c: Update. * sh-tdep.c: Update. * s390-tdep.c: Update. * rs6000-tdep.c: Update. * sparc-tdep.c: Update. * i386-tdep.c: Update. * dwarf2cfi.c: Update. * regcache.c: Update.
2002-03-23* defs.h (error): Add printf format attribute.Andrew Cagney1-1/+1
* thread-db.c (thread_from_lwp): Fix error format string. * stack.c (parse_frame_specification): Ditto. * cli/cli-decode.c (undef_cmd_error): Ditto. * scm-lang.c (scm_lookup_name): Ditto. * tracepoint.c (trace_error): Ditto. * remote-utils.c (usage): Ditto. * remote.c (compare_sections_command): Ditto. Fix PR gdb/328.
2002-02-24* lin-lwp.c, thread-db.c, defs.h, cris-tdep.c: Replace ``Linux''Andrew Cagney1-2/+3
with either ``GNU/Linux'' or ``Linux kernel''. Fix PR gdb/378.
2002-01-082002-01-07 Michael Snyder <msnyder@redhat.com>Michael Snyder1-3/+3
* thread-db.c (thread_db_new_objfile): Indendation fix.
2002-01-052002-01-04 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz1-1/+3
* thread-db.c (thread_db_new_objfile): Do not enable thread_db for core files.
2001-10-13* thread-db.c: Fix a few formatting mistakes.Mark Kettenis1-25/+19
2001-07-11* thread-db.c (enable_thread_event_reporting): Correct warningMark Kettenis1-1/+1
message about getting thread death breakpoint. Reported by John S Kallal <jskallal@home.com>.
2001-07-032001-07-03 Michael Snyder <msnyder@redhat.com>Michael Snyder1-3/+3
* thread_db (find_new_threads_callback, thread_db_thread_alive, attach_thread): Update comments.
2001-07-032001-06-29 Ken Whaley <ken@believe.com>Michael Snyder1-3/+7
* thread-db.c (attach_thread): Check for TD_THR_ZOMBIE in addition to TD_THR_UNKNOWN when looking for defunct zombie threads. (thread_db_thread_alive): Ditto. (find_new_threads_callback): Ditto.
2001-05-232001-05-22 Michael Snyder <msnyder@redhat.com>Michael Snyder1-3/+17
* thread-db.c: Allow for defunct zombie threads. (attach_thread): Do not attempt to attach zombie thread. (thread_db_thread_alive): Return false for defunct zombie thread. (find_new_threads_callback): Don't add defunct zombie thread to list.
2001-05-15Redefine ptid_t to be a struct rather than an int.Kevin Buettner1-14/+7
2001-05-06Consolidate save_inferior_ptid/restore_inferior_ptid implementation toKevin Buettner1-21/+0
one source file.
2001-05-06Implement attach/detach for multi-threaded programs on Linux.Mark Kettenis1-23/+50
* thread-db.c (keep_thread_db): Adjust comment. (deactivate_target): Removed. (thread_db_new_objfile): Don't call deactivate_target. Implement guts of deactivate_target inline instead. (attach_thread): Call ATTACH_LWP unconditionally if defined. (thread_db_attach): New function. (thread_db_detach): Don't call deactivate_target. Do necessary cleanup inline instead. Set inferior_ptid to LWP corresponding to the current user-level thread. (thread_db_kill): Set inferior_ptid to LWP corresponding to the current user-level thread. (thread_db_create_inferior): Deactivate target vector if KEEP_THREAD_DB is zero. (thread_db_mourn_inferior): Don't call deactivate_target. Do necessary cleanup inline instead. (init_thread_db_ops): Initialize to_attach field to thread_db_attach. * lin-lwp.c (lin_lwp_mourn_inferior): Remove prototype. (stop_wait_callback): Add prototype. (init_lwp_list): Add comment about when to re-initialize the LWP list. (lin_lwp_attach_lwp): Only call ptrace for cloned processes. Avoid adding publicates to the LWP list. Only mark an LWP as signalled if it doesn't correspond to a cloned process. (lin_lwp_attach): Add initial process to the LWP list. Make sure it's stopped and fake a SIGSTOP. (detach_callback): New function. (lin_lwp_detach): Implement. (lin_lwp_create_inferior): Don't re-initialize LWP list here. Call child_ops.to_create_inferior directly instead of via target_beneath local. (lin_lwp_mourn_inferior): Call child_ops.to_mourn_inferior directly instead of via target_beneath local.
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-92/+93
2001-04-302001-04-30 Michael Snyder <msnyder@redhat.com>Michael Snyder1-17/+9
* thread-db.c: Revert 2001-04-26 change for debugging output. * lin-lwp.c: Ditto.
2001-04-262001-04-26 Michael Snyder <msnyder@redhat.com>Michael Snyder1-9/+17
* thread-db.c (_initialize_thread_db): Add set/show command "debug-linux-threads" for debugging output. * lin-lwp.c (various): Use global "debug_linux_threads to turn on extra debugging output.
2001-04-172001-04-17 Michael Snyder <msnyder@redhat.com>Michael Snyder1-2/+2
* thread-db.c (check_thread_signals): When looping over all signals, ignore signal zero. (disable_thread_signals): Ditto.
2001-03-30* thread-db.c (check_event): Don't report an error if we encounterMark Kettenis1-4/+5
a thread creation event for a thread that's already in the thread list, since that may legitemately happen. Instead only call attach_thread if it's not already in the thread list.
2001-03-01Create new file regcache.h. Update all uses.Andrew Cagney1-1/+2
2001-01-24* lin-lwp.c (lin_lwp_xfer_memory): Add attrib argument.J.T. Conklin1-1/+2
* thread-db.c (thread_db_xfer_memory): Likewise.
2000-12-27Fix debugging programs statically linked against the thread library.Mark Kettenis1-46/+80
* thread-db.c: Various comment fixes and additions. Include "bfd.h", "symfile.h" and "objfiles.h". (keep_thread_db): New variable. (find_new_threads_callback): Remove prototype. (thread_db_find_new_threads): New prototype. (thread_db_push_target, thread_db_unpush_target): Remove functions. (deactivate_target): New function. (thread_db_new_objfile): If OBJFILE == NULL, force deactivation of target vector. Activate target vector directly instead of calling thread_db_push_target. Set keep_thread_db if thread library is detected in the main symbol file. Only enable thread event reporting if there actually is a child process. Likewise for detecting new threads, done by calling thread_db_find_new_threads instead of iterating over the threads ourselves. (thread_db_detach): Call deactivate_target instead of thread_db_unpush_target. (thread_db_wait): Bail out early if we're not debugging the multi-threaded child process yet. (thread_db_post_startup_inferior): New function. (thread_db_mourn_inferior): Call deactivate_target instead of thread_db_unpush_target. (init_thread_db_ops): Add thread_db_post_startup_inferior to thread_db_ops.
2000-12-15Replace free() with xfree().Kevin Buettner1-1/+1
2000-09-03* config/i386/nm-linux.h (PREPARE_TO_PROCEED, ATTCH_LWP,Mark Kettenis1-0/+992
GET_THREAD_SIGNALS): New defines. * config/i386/linux.mh (NATDEPFILES): Remove lin-thread.o and linux-threads.o. Add proc-service.o, thread-db.o and lin-lwp.o. * proc-service.c: New file. * thread-db.c: New file. * lin-lwp.c: New file.