aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread-db.c
AgeCommit message (Collapse)AuthorFilesLines
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.