summaryrefslogtreecommitdiff
path: root/gdb/dec-thread.c
Commit message (Collapse)AuthorAgeFilesLines
* more add_target removalsTom Tromey2013-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | This removes a few more erroneous calls to add_target. These calls end up installing the target in a user-visible way; but these targets are all auto-activated and, I think, should never be explicitly requested. I have no way to test these. * aix-thread.c (_initialize_aix_thread): Use complete_target_initialization. * bsd-uthread.c (_initialize_bsd_uthread): Use complete_target_initialization. * dec-thread.c (_initialize_dec_thread): Use complete_target_initialization. * ravenscar-thread.c (_initialize_ravenscar): Use complete_target_initialization. * sol-thread.c (_initialize_sol_thread): Use complete_target_initialization. * spu-multiarch.c (_initialize_spu_multiarch): Use complete_target_initialization.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-1/+1
| | | | | | | Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-1/+1
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* Fix ARI warnings about new lines at the end of messages, whichPierre Muller2011-03-161-1/+1
| | | | | | | | | | | | | | | | | are unneeded as there is a new line added at the end of the message automatically. * darwin-nat.c (darwin_stop_inferior): Ditto. * dec-thread.c (dec_thread_get_ada_task_ptid): Ditto. * dfp.c (decimal_to_number): Ditto. * exec.c (print_section_info): Ditto. * i386-darwin-nat.c (darwin_set_sstep): Ditto. * osdata.c (get_osdata): Ditto. * record.c (bfdcore_write): Ditto. * remote-mips.c (mips_readchar): Ditto. * remote.c (read_ptid): Ditto. * ser-mingw.c (ser_windows_raw): Ditto. * tracepoint.c (add_local_symbols): Ditto. * windows-nat.c (fake_create_process): Ditto.
* 2011-01-07 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: Comment cleanup, mostly periods and spaces. * ada-lang.h: Ditto. * ada-tasks.c: Ditto. * ada-valprint.c: Ditto. * aix-threads.c: Ditto. * alpha-linux-nat.c: Ditto. * alpha-linux-tdep.c: Ditto. * alpha-mdebug-tdep.c: Ditto. * alpha-nat.c: Ditto. * alpha-osf1-tdep.c: Ditto. * alpha-tdep.c: Ditto. * alphabsd-nat.c: Ditto. * alphabsd-tdep.c: Ditto. * amd64-darwin-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * amd64-sol2-tdep.c: Ditto. * amd64-tdep.c: Ditto. * amd64-fbsd-tdep.c: Ditto. * amd64-nbsd-tdep.c: Ditto. * amd64-obsd-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * arm-tdep.c: Ditto. * arm-tdep.h: Ditto. * armnbsd-nat.c: Ditto. * avr-tdep.c: Ditto. * bfin-tdep.c: Ditto. * bsd-kvm.c: Ditto. * c-typeprintc: Ditto. * c-valprint.c: Ditto. * coff-pe-read.h: Ditto. * coffreead.c: Ditto. * cris-tdep.c: Ditto. * d-lang.c: Ditto. * darwin-nat-info.c: Ditto. * darwin-nat.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * dcache.c: Ditto. * dcache.h: Ditto. * dec-thread.c: Ditto. * defs.h: Ditto. * demangle.c: Ditto. * dicos-tdep.c: Ditto. * dictionary.c: Ditto. * dictionary.h: Ditto. * dink32-rom.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dsrec.c: Ditto. * dummy-frame.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * environ.c: Ditto. * eval.c: Ditto. * event-top.h: Ditto. * exceptions.c: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-exp.y: Ditto. * f-lang.c: Ditto. * f-lang.h: Ditto. * f-typeprint.c: Ditto. * f-valprint.c: Ditto. * fbsd-nat.c: Ditto. * findvar.c: Ditto. * fork-child.c: Ditto. * frame.c: Ditto. * frame.h: Ditto. * frv-linux-tdep.c: Ditto. * frv-tdep.c: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_string.h: Ditto. * gdb_thread_db.h: Ditto. * gdb_wait.h: Ditto. * gdbarch.sh: Ditto. * gdbcore.h: Ditto. * gdbthread.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * gnu-nat.c: Ditto. * gnu-nat.h: Ditto. * gnu-v2-abi.c: Ditto. * gnu-v3-abi.c: Ditto. * go32-nat.c: Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+1
|
* Implement thread support with core files on alpha-tru64Joel Brobecker2010-04-201-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thread support currently does not work with core files. Note that, in order to thread support to work on tru64, one need to allow GDB to write in the core file (this is because the thread debug library needs to write). An obvious visible symptom of the problem is that "info threads" does not list the various threads: (gdb) info threads * 1 <main task> 0x000003ff805c0918 in __nxm_thread_kill () from /usr/shlib/libpthread.so One other noticeable consequence is that GDB generates some warnings when using "info tasks": (gdb) info tasks warning: Could not find thread id from THREAD = 0x3ffc01b6000 warning: Could not find thread id from THREAD = 0x20000e2b4c0 ID TID P-ID Pri State Name * 1 140051000 0 30 Runnable main_task * 2 14005c000 1 30 Accept or Select Term my_t (notice also how both tasks are marked as being the active task, which cannot be true). The problem is that the dec-thread module has not updated its thread list after the core file got loaded. In fact, the list only gets resync'ed at the end of each target-wait. The solution was to implement the find_new_threads target_ops method. gdb/ChangeLog: Implement thread support with core files on alpha-tru64. * dec-thread.c (dec_thread_find_new_threads): New function, extracted from resync_thread_list. (resync_thread_list): Add OPS parameter. Replace extracted-out code by call to dec_thread_find_new_threads. (dec_thread_wait): Update call to resync_thread_list. (init_dec_thread_ops): Set dec_thread_ops.to_find_new_threads.
* Tru64: Dead threads are never deleted.Joel Brobecker2010-01-141-13/+29
| | | | | | | | * dec-thread.c (dec_thread_ptid_is_alive): New function. (dec_thread_count_gdb_threads): Fix counter increment. (dec_thread_add_gdb_thread): Fix *listp increment. (resync_thread_list): Fix bug in deletion of dead threads that caused all threads to be deleted, instead of just the dead ones.
* Fix -Wunused warning in dec-thread.c.Joel Brobecker2010-01-121-2/+2
| | | | | * dec-thread.c (dec_thread_count_gdb_threads) (dec_thread_add_gdb_thread): Prevent -Wunused warning.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+1
| | | | Automatic update by copyright.sh.
* * dec-thread.c (dec_thread_wait): Add options parameter. Use itPedro Alves2009-05-211-2/+2
| | | | | to call the to_wait method in the target beneath. * remote-m32r-sdi.c (m32r_wait): Add options parameter.
* Implement the target-specific part of Ada tasking supportJoel Brobecker2009-03-051-0/+21
| | | | | | | on Tru64. * dec-thread.c (dec_thread_get_ada_task_ptid): New function. (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
* Get rid of the global "base_target" and use "find_target_beneath"Joel Brobecker2009-03-051-22/+32
| | | | | | | | | | | | | | | | | | | to find the underlying target. * dec-thread.c (base_target): Delete. (enable_dec_thread): Remove assignement to base_target. (dec_thread_detach, dec_thread_wait, dec_thread_wait) (dec_thread_fetch_registers, dec_thread_store_registers) (dec_thread_mourn_inferior, dec_thread_pid_to_str): Update the function profile if necessary. Use find_target_beneath to call the same method but from the underlying target, removing the need for "base_target". * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets): Fix a copy/paste error in a few debug traces... * solib-osf.c (init_so): Use a simpler method for computing the size of lm_info structure. This also gets rid of warning emitted by the compiler.
* * linux-nat.c (linux_nat_wait): Adjust.Pedro Alves2009-02-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init. * linux-nat.h (thread_db_init): Delete declaration. * linux-thread-db.c (target_beneath): Delete. (thread_db_init): Delete. (thread_db_detach): Use find_target_beneath. (thread_db_wait): Adjust interface. Use find_target_beneath. (thread_db_mourn_inferior): Use find_target_beneath. (thread_db_can_async_p, thread_db_is_async_p, thread_db_async) (thread_db_async_mask): Delete. (thread_db_pid_to_str): Adjust interface. Use find_target_beneath. (thread_db_get_thread_local_address): Adjust interface. Use find_target_beneath. (init_thread_db_ops): Delete references to delete functions. * target.c (update_current_target): Don't inherit or default to_wait. Don't inherit to_pid_to_str and to_get_thread_local_address. (target_translate_tls_address): Look for a pushed target that implements to_get_thread_local_address, and use it instead of checking for target_get_thread_local_address_p. (target_wait, target_pid_to_str): Reimplement as functions. (dummy_pid_to_str): New. (init_dummy_target): Register it. (debug_to_wait): Delete. * target.h (struct target_ops): Make to_wait, to_pid_to_str and to_get_thread_local_address accept a pointer to struct target_ops. (target_wait): Delete macro, and declare as function. (target_pid_to_str): Likewise. (target_get_thread_local_address) (target_get_thread_local_address_p): Delete. (noprocess): Add NORETURN and ATTR_NORETURN tags. * inf-ptrace.c (inf_ptrace_wait): Adjust. (inf_ptrace_pid_to_str): New. (inf_ptrace_target): Use inf_ptrace_pid_to_str. * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust. * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust. * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str): Adjust. * corelow.c (core_pid_to_str): Adjust. * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust. * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust. * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust. * go32-nat.c (go32_wait, go32_pid_to_str): Adjust. * hpux-thread.c (hpux_thread_wait): Adjust. * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust. * monitor.c (monitor_wait, monitor_pid_to_str): Adjust. * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust. * procfs.c (procfs_pid_to_str): Adjust. * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust. * remote-mips.c (mips_wait): Adjust. * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust. * remote.c (remote_wait, remote_pid_to_str) (remote_get_thread_local_address): Adjust. * rs6000-nat.c (rs6000_wait): Adjust. * sol-thread.c (procfs_pid_to_str): Adjust declaration. (sol_thread_wait, solaris_pid_to_str): Adjust. * spu-linux-nat.c (spu_child_wait): Adjust. * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
* Updated copyright notices for most files.Joel Brobecker2009-01-031-1/+1
|
* Kill pthread_ops_hackVladimir Prus2008-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target.h (struct target_ops): Make to_attach, to_detach, to_create_inferior and to_mourn_inferior accept a pointer to struct target_ops. (target_attach, target_create_inferior, target_create_inferior): Convert from macros to function. Find the right target to invoke a method of. (find_default_attach, find_default_create_inferior): New parameter ops. * corefile.c (core_file_command): Pass target to to_detach. * corelow.c (core_detach): Add 'ops' parameter. * fork-child.c (fork_inferior): Return the pid. Allow init_trace_fun to be NULL. * inf-ptrace (ptrace_ops_hack): Remove. (inf_ptrace_him): Remove, moving all logic into.... (inf_ptrace_create_inferior): ... here. Push the target passed as parameter. (inf_ptrace_mourn_inferior, inf_ptrace_attach, inf_ptrace_detach): Push/pop target passed as parameter, no ptrace_ops_hack. (inf_ptrace_target): Don't remember result. * inferior.h (fork_inferior): Adjust prototype. * linux-nat.c (linux_nat_create_inferior, linux_nat_attach) (linux_nat_detach, linux_nat_mourn_inferior): New parameter ops. Pass it to linux_ops target. * linux-thread-db.c (thread_db_detach, thread_db_mourn_inferior): New parameter ops. Pass it to the target beneath. * remote.c (remote_mourn, extended_remote_mourn, remote_detach) (extended_remote_create_inferior): New parameter ops. Pass it further. * target.c (debug_to_attach, debug_to_detach) (debug_to_mourn_inferior): New parameter ops. (target_create_inferior): New. (update_current_target): Do not inherit to_attach, to_detach, to_create_inferiour, to_mourn_inferior. Do not default to_detach and to_mourn_inferior. (target_detach): Find the right target to use. (target_mourn_inferior): New. (find_default_attach, find_default_create_inferior): New parameter ops. Pass the found target when calling its method. (init_dummy_target): Provide fallback definition of to_detach. (target_attach): New. (debug_to_attach, debug_to_detach, debug_to_create_inferior) (debug_to_mourn_inferiour): New parameter ops. * aix-thread.c: Adjust. * bsd-uthread.c: Adjust. * gnu-nat.c: Adjust. * go32-nat.c: Adjust. * hpux-thread.c: Adjust. * inf-ttrace.c: Ajust. * monitor.c: Adjust. * nto-procfs.c: Adjust. * procfs.c: Adjust. * remote-m32r-sdi.c: Adjust. * remote-mips.c: Adjust. * remote-sim.c: Adjust. * rs6000-nat.c: Adjust. * sol-thread.c: Adjust. * win32-nat.c: Adjust. * dec-thread.c: Adjust.
* * dec-thread.c: New file.Joel Brobecker2008-10-201-0/+683
* config/alpha/alpha-osf3.mh (NATDEPFILES): Add dec-thread.o. (NAT_CLIBS): Define.