patch committed by Elena Zannoni <ezannoni@redhat.com>
* thread.c (do_captured_list_thread_ids): Call prune_threads and
target_find_new_threads. Fix for PR mi/669.
* 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.
* 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.
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).
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.
* 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.
* 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. :-)