aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
AgeCommit message (Collapse)AuthorFilesLines
2002-11-292002-11-29 Andrew Cagney <ac131313@redhat.com>Andrew Cagney1-7/+8
* stack.c (selected_frame, select_frame): Move from here ... * frame.c (selected_frame, select_frame): ... to here. Include "language.h". * Makefile.in (frame.o): Update dependencies. * frame.c (get_selected_frame): New function. * frame.h (get_selected_frame): Declare. (deprecated_selected_frame): Rename selected_frame. * ada-lang.c, ada-tasks.c, breakpoint.c, corelow.c: Update. * eval.c, f-valprint.c, findvar.c, frame.c, frame.h: Update. * h8300-tdep.c, h8500-tdep.c, hppa-tdep.c, infcmd.c: Update. * inflow.c, infrun.c, macroscope.c, mips-tdep.c: Update. * mn10300-tdep.c, ocd.c, regcache.h, remote-e7000.c: Update. * remote-mips.c, remote-rdp.c, sh-tdep.c, sparc-tdep.c: Update. * stack.c, thread.c, tracepoint.c, valops.c, varobj.c: Update. * z8k-tdep.c, cli/cli-cmds.c: Update. Index: mi/ChangeLog 2002-11-29 Andrew Cagney <ac131313@redhat.com> * mi/mi-cmd-stack.c, mi/mi-main.c: Update to use deprecated_selected_frame. Index: tui/ChangeLog 2002-11-29 Andrew Cagney <ac131313@redhat.com> * tui/tui-hooks.c: Update to use deprecated_selected_frame. * tui/tui.c, tui/tuiDisassem.c, tui/tuiRegs.c: Ditto. * tui/tuiSource.c, tui/tuiSourceWin.c, tui/tuiWin.c: Ditto.
2002-08-02Fri Aug 2 15:53:50 2002 Andrew Cagney <cagney@redhat.com>Andrew Cagney1-0/+1
* gdbarch.sh: Include "gdb_string.h". * gdbarch.c: Regenerate. * regcache.c: Include "gdb_string.h". * ax-general.c: Ditto. * varobj.c: Ditto. * std-regs.c: Ditto. * fbsd-proc.c: Ditto. * thread.c: Ditto. * Makefile.in (regcache.o): Update dependencies. (thread.o, gdbarch.o): Ditto. (ax-general.o, gdbarch.o): Ditto. (varobj.o, std-regs.o): Ditto. (fbsd-proc.o): Specify dependencies.
2002-05-05* frame.h (select_frame): Delete level parameter.Andrew Cagney1-2/+2
* stack.c (select_frame): Update. Use frame_relative_level to obtain the frame's level. (select_and_print_frame): Update call. (select_frame_command): Ditto. (up_silently_base): Ditto. (down_silently_base): Ditto. * ocd.c (ocd_start_remote): Ditto. * remote-rdp.c (remote_rdp_open): Ditto. * remote-mips.c (mips_initialize): Ditto. (common_open): Ditto. * remote-e7000.c (e7000_start_remote): Ditto. * m3-nat.c (select_thread): Ditto. * hppa-tdep.c (child_get_current_exception_event): Ditto. (child_get_current_exception_event): Ditto. * varobj.c (varobj_create): Ditto. (varobj_update): Ditto. (c_value_of_root): Ditto. * tracepoint.c (finish_tfind_command): Ditto. * corelow.c (core_open): Ditto. * arch-utils.c (generic_prepare_to_proceed): Ditto. * thread.c (info_threads_command): Ditto. (switch_to_thread): Ditto. * infrun.c (normal_stop): Ditto. (restore_selected_frame): Ditto. (restore_inferior_status): Ditto. * breakpoint.c (insert_breakpoints): Ditto. (watchpoint_check): Ditto. (bpstat_stop_status): Ditto. (do_enable_breakpoint): Ditto. * blockframe.c (flush_cached_frames): Ditto. (reinit_frame_cache): Ditto.
2002-04-21* frame.h (selected_frame_level): Document as deprecated.Andrew Cagney1-2/+2
(frame_relative_level): Declare. * stack.c (frame_relative_level): New function. (selected_frame_level): Document as deprecated. (select_frame): Do not set the selected_frame_level. * stack.c (frame_info, record_selected_frame): Update. (frame_command, current_frame_command): Update. (up_silently_base, up_command, down_silently_base): Update. (down_command): Update. * inflow.c (kill_command): Update. * tracepoint.c (finish_tfind_command): Update. * corelow.c (core_open): Update. * thread.c (info_threads_command): Update. (do_captured_thread_select): Update. * infcmd.c (finish_command): Update. * breakpoint.c (insert_breakpoints, do_enable_breakpoint): Update.
2002-01-17Remove else clause to #if UI_OUT.Andrew Cagney1-25/+5
2001-09-18Add ui_out parameter to libgdb functions.Andrew Cagney1-9/+12
2001-07-28Move libgdb library functions to gdb.h (new file).Andrew Cagney1-0/+1
Update everything related to this.
2001-06-132001-06-13 Michael Snyder <msnyder@redhat.com>Michael Snyder1-33/+42
* gdbthread.h (struct thread_info): Add new fields: current_line, current_symtab, step_sp, for saved infrun state. * thread.c (save_infrun_state, load_infrun_state): Save and restore current_line, current_symtab, and step_sp. (add_thread): Rather than adding assignments to initialize the new fields, just use memset (tp, 0, sizeof (*tp). This way future new fields will not be overlooked. * infrun.c (handle_inferior_event): Save and restore save_sp, current_line, and current_symtab when switching threads.
2001-06-022001-06-01 Michael Snyder <msnyder@redhat.com>Michael Snyder1-0/+17
* thread.c (delete_step_resume_breakpoint): New function. Maintain internal consistency of the thread list while deleting a step_resume_breakpoint. * gdbthread.h (delete_step_resume_breakpoint): Export. * breakpoint.c (bpstat_find_step_resume_breakpoint): Make thread-aware: don't return a step_resume_breakpoint for the wrong thread. * infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint instead of delete_breakpoint_current_contents. (fetch_inferior_event): Ditto. (handle_inferior_event): Call delete_step_resume_breakpoint instead of delete_breakpoint.
2001-05-12* thread.c (do_captured_list_thread_ids): Use ui_out_tuple_beginJim Blandy1-2/+2
and ui_out_tuple_end instead of ui_out_list_begin and ui_out_list_end.
2001-05-04Phase 1 of the ptid_t changes.Kevin Buettner1-59/+59
2001-04-172001-04-17 Eirik Fuller <eirik@netapp.com>Michael Snyder1-1/+1
* thread.c (do_captured_thread_select): Allow the argument to the thread command to be an expression rather than a literal integer.
2001-03-06Update/correct copyright notices.Kevin Buettner1-3/+4
2001-03-01Create new file regcache.h. Update all uses.Andrew Cagney1-0/+1
2001-01-262001-01-24 Jeff Holcomb <jeffh@redhat.com>Jeff Holcomb1-3/+3
* remote-udi.c (udi_open): Change strdup to xstrdup. * thread.c (thread_apply_all_command): Change strdup to xstrdup. Update copyright message. * varobj.c (delete_variable_1): Likewise. * gdb_string.h: Remove declaration of strdup. Update copyright message. * config/xm-mpw.h: Likewise. * config/i386/xm-i386mach.h: Likewise. * config/m68k/xm-apollo68b.h: Likewise. * config/m68k/xm-hp300bsd.h: Likewise. * config/rs6000/xm-rs6000.h: Likewise. * config/vax/xm-vaxult.h: Remove declaration of strdup. * config/vax/xm-vaxult2.h: Likewise.
2000-12-15Replace free() with xfree().Kevin Buettner1-5/+5
2000-11-17* thread.c (thread_apply_all_command): Save the command before executing itChristopher Faylor1-0/+16
because it may be modified. Restore the saved command so that the same command is executed on next thread. (thread_apply_command): Same correction.
2000-10-28Protoization.Kevin Buettner1-3/+2
2000-07-30Protoization.Kevin Buettner1-83/+36
2000-07-222000-07-21 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-0/+4
* thread.c (thread_apply_all_command): Update thread list first.
2000-07-19 * thread.c (free_thread): New function.Nicholas Duffek1-15/+19
(init_thread_list): Always zero highest_thread_num. Call free_thread() instead of free(). (delete_thread): Move thread cleanup code to free_thread().
2000-06-07Purge last remaining make_cleanup_func.Andrew Cagney1-4/+28
2000-05-28PARAMS removal.Kevin Buettner1-10/+10
2000-02-03import gdb-2000-02-02 snapshotJason Molenda1-0/+51
2000-01-18import gdb-2000-01-17 snapshotJason Molenda1-7/+21
2000-01-11import gdb-2000-01-10 snapshotJason Molenda1-39/+63
1999-09-09import gdb-1999-09-08 snapshotStan Shebs1-1/+1
1999-08-23import gdb-1999-08-23 snapshotJason Molenda1-10/+6
1999-07-07import gdb-1999-07-07 post reformatJason Molenda1-102/+106
1999-06-07import gdb-1999-06-07 snapshotJason Molenda1-66/+0
1999-05-25import gdb-1999-05-25 snapshotJason Molenda1-0/+1
1999-05-05import gdb-19990504 snapshotStan Shebs1-7/+3
1999-04-26import gdb-19990422 snapshotStan Shebs1-2/+3
1999-04-16Initial creation of sourceware repositorygdb-4_18-branchpointStan Shebs1-0/+721
1999-04-16Initial creation of sourceware repositoryStan Shebs1-721/+0
1999-01-13 * thread.c: cull duplicate prototypes. Move prototypes to top.Michael Snyder1-55/+32
* serial.c: indentation cleanup. * breakpoint.c: add casts to eliminate compiler warnings.
1999-01-06 * remote.c (record_curthread): Must not modify inferior_pid whenMichael Snyder1-2/+2
called from wait_for_inferior. Instead, if a new thread-id is detected, call add_thread. (MAGIC_NULL_PID): new macro, use instead of the magic number "42000". (remote_find_new_threads): if inferior_pid is unknown, get and use the current thread id. (remote_start_remote): on connecting, attempt to get the current thread id for inferior_pid. (remote_resume): If pid == -1, then resume any-thread (not the current thread specifically). * thread.c (info_threads_command): don't initialize current_pid until after call to FIND_NEW_THREADS (which may change inferior_pid).
1999-01-05Cosmetic and indentation fixes.Michael Snyder1-23/+26
1998-12-31all remaining *.c *.h files from hp merge.David Taylor1-12/+116
1998-11-13 * remote.c (remote_get_threadinfo) : Support for remoteJohn Metzler1-6/+88
multithread debugging. (remote_get_threadlist) : get a partial list of threads (remote_threadlist_iterator) : Step through all the threads (init_remote_threadtests) : Optional builtin unit test commands. * thread.c (bind_target_thread_vector) : Implementa a more dynamic way of accessing target specific thread info functions than FIND_NEW_THREADS. (target_thread_info) : Function to get extended thread information. * gdbthread.h : Export internal data structures corresponding to external detailed thread info response. This is more like a 'ps' command than what might be expected of host based threads. This is for embedded systems.
1998-10-141998-10-14 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-18/+15
* defs.h: Move _initialize_printcmd, _initialize_stack, _initialize_blockframe out of here and in to their respective .c files. * blockframe.c: Move _initialize_blockframe prototype to here. * printcmd.c: Move _initialize_printcmd prototype to here. * stack.c: Move _initialize_stack prototype to here. * source.c, symtab.h: Move _initialize_source prototype to the .c file. * values.c, value.h: Move _initialize_values prototype to the .c file. * gdbthread.h, thread.c: Move _initialize_thread prototype to the .c file. * breakpoint.c, breakpoint.h: Move _initialize_breakpoint prototype to the .c file. * abug-rom.c alpha-nat.c alpha-tdep.c annotate.c ax-gdb.c bcache.c: Standardize comments for the prototype section of these files. * configure.in: Look in libc for wctype before looking for it in libc. The last one is to fix the GNU ld (~2.9.1) + Solaris 2.6 interaction problem where an empty stub library (libw) causes a core dump when we call vasprintf (e.g. `info br') in the final linked gdb.
1998-10-141998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-2/+4
* blockframe.c (find_pc_sect_partial_function): Add braces to avoid possible nested-if confusion. * breakpoint.c (breakpoint_here_p): Ditto. (breakpoint_inserted_here_p): Ditto. (breakpoint_thread_match): Ditto. * gnu-regex.c: Define _REGEX_RE_COMP only if it isn't already defined. * gnu-regex.h: Define _REGEX_RE_COMP to pick up old compatability prototypes. * symtab.h: Add prototype for _initialize_source. * value.h: Add prototype for _initialize_value. * defs.h: Include sys/types.h or stddef.h to get size_t. (make_cleanup): Add make_cleanup_func typedef and switch to using a prototype for this function. (mfree): Add prototypes for mmalloc, mrealloc, mfree if we aren't using mmalloc. * ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c dwarf2read.c dwarfread.c elfread.c eval.c exec.c gdbtk-cmds.c gdbtk.c infcmd.c infrun.c mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c valops.c: Cast parameters passed to make_cleanup to use the new make_cleanup_func typedef. More warning cleanups. There are still a bunch of places where the first argument to make_cleanup is not cast to (make_cleanup_func); these are either due to the function fitting the make_cleanup_func specification already (e.g. free()) or they are in files that weren't compiled when I did my make on a Linux native system. Bwahahaha. You can see them like this: grep make_cleanup\ * | grep -v make_cleanup_func I'll surely go back and clean up the remaining suspicious calls in GDB one of these days. :-)
1998-10-061998-10-06 Jason Molenda (jsm@bugshack.cygnus.com)Jason Molenda1-1/+4
Eliminate a few warnings from the compiler. * breakpoint.h: Add prototype. * breakpoint.c (do_enable_breakpoint): cast mem_cnt, i to (void). * configure.in: Check if strdup declaration is necessary. * configure: Regenerated. * defs.h: Add prototypes. * gdb_string.h: Only define strdup if necessary. * gdbthread.h: Add prototypes. * printcmd.c: Add prototyptes. (disassemble_command): Remove unused variable 'section'. * symtab.c: Add prototypes. * symtab.h: Include gnu-regex.h, add prototype. * thread.c: Add prototype.
1998-08-30Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>Martin Hunt1-1/+2
* gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context with tcl variable gdb_context_id. * gdbtk-hooks.c (gdbtk_context_change): Implement new hook called context_hook. Called when threads change. * gdbtk.c: Initialize gdb_context. * gdbtk.h: Declare gdb_context. * infrun (wait_for_inferior): Call context_hook. * thread.c (thread_command): Call context_hook. * defs.h: Declare context_hook.
1997-10-24fix for PR 13618 -- gdb incorrectly reports thread information.David Taylor1-0/+4
If other systems besides nm-sun4sol2 exhibit the problem, they may need definitions of FIND_NEW_THREADS and a corresponding support function.
1997-05-21Wed May 21 16:03:25 1997 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-1/+29
* procfs.c (init_procinfo): new function, abstracts some code shared by create_procinfo and do_attach; (procfs_set_inferior_syscall_traps): new function, abstracts some code needed by procfs_init_inferior, do_attach, and procfs_lwp_creation_handler; (procfs_first_available): new function, find any LWP that's runnable; (procfs_thread_alive): replace stub function with real implementation; (procfs_lwp_creation_handler): fix bug starting new child threads; (info_proc): bug fixes and enhancements for the "INFO PROCESSES" command; (close_procinfo_file): call new function "delete_thread" to cleanup GDB's thread database; (proc_init_failed): add new argument "kill", to control whether process is killed (so this function can be shared by create_procinfo and do_attach); (procfs_exit_handler): handle exit from an attached process, and cleanup procinfo handles when the process exits; (procfs_resume, procfs_wait): cleanup after a thread when it exits; (do_attach, do_detach): handle attached processes with multiple threads; plus some general improvements in the diagnostic output. * sol-thread.c (sol_thread_alive): replace stub with real implementation; (thread_to_lwp, lwp_to_thread): enhance to handle threads that may have exited; (sol_thread_attach): add startup setup stuff; (sol_thread_detach): add unpush_target call; (sol_thread_mourn_inferior): add unpush_target call; (sol_thread_wait, sol_thread_resume): enhance to deal with thread exit cleanly; (sol_thread_new_objfile, sol_thread_pid_to_str): detect unsuccessful startup and don't crash; plus some general cleanup. * thread.c (delete_thread): new function, allows targets to notify gdb when a thread is no longer valid. * infrun.c (wait_for_inferior): don't try to detect a new thread on receiving a TARGET_EXITED event.
1997-05-01Thu May 1 11:44:46 1997 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-34/+49
* Finalize merge from Hurd folk. Mon Oct 30 16:41:04 1995 Miles Bader <miles@gnu.ai.mit.edu> * thread.c (thread_apply_command, thread_apply_all_command, thread_command): Make sure TP is alive. (thread_alive): New function. Tue Nov 14 14:31:03 1995 Miles Bader <miles@gnu.ai.mit.edu> * infrun.c (sig_print_info): Deal better with long signal names. Wed Nov 22 15:23:35 1995 Miles Bader <miles@gnu.ai.mit.edu> * thread.c (thread_id_to_pid): New function. Fri Dec 1 13:25:25 1995 Miles Bader <miles@gnu.ai.mit.edu> * gnu-nat.c: (set_thread_cmd_list, show_thread_cmd_list, set_thread_default_cmd_list, show_thread_default_cmd_list): New variables. (set_thread_cmd, show_thread_cmd, set_thread_default_cmd, show_thread_default_cmd): New functions. Fri Apr 18 15:20:16 1997 Miles Bader <miles@gnu.ai.mit.edu> * gnu-nat.c (inf_startup): remove TASK parameter. (inf_set_task): replace with new function (inf_set_pid). * gdbthread.h: Add extern decl for thread_cmd_list.
1997-04-29Mon Apr 28 21:25:32 1997 Michael Snyder <msnyder@cleaver.cygnus.com>Michael Snyder1-9/+22
* Makefile.in: Add rule for gnu-nat.o and i386gnu-nat.o (Gnu Hurd) * config/i386/i386gnu.mh: remove rules for [i386]gnu-nat.o, now in Makefile.in (as for other targets); add NATDEPFILE corelow.o to satisfy symbol dependancy in solib.c (core_ops). * target.[ch] conditionalize Mach-specific signals so that they won't show up in non-Mach gdb's! * thread.c: add function thread_id_to_pid; change name of static function "thread_switch" to "switch_to_thread", to avoid conflict with Mach global symbol; move thread_cmd_list to global scope so targets can add their own thread commands. * infrun.c: sig_print_info: allow for long signal names. * gnu-nat.[ch]: tidying up comments. * gnu-nat.c: move several functions to static scope, just for tidy; remove calls to prune_threads and renumber_threads; gnu_wait must not return -1 when inferior exits; attach_to_child will modify inferior_pid in a way that allows fork_inferior to remain unchanged; remove extra arg from startup_inferior; move mach-specific thread commands here from thread.c.
1996-07-26See gdb ChangeLog entry with header:Fred Fish1-4/+20
Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> for a rather huge set of changes. I was going to put them here, but it made cvs dump core. :-(
1996-05-09 * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,Stu Grossman1-1/+1
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c, win32-nat.c, config/nm-lynx.h: Rename thread.h to gdbthread.h to avoid conflict with Solaris /usr/include/thread.h.