* dwarf2read.c
(new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
Create the symbol in local scope.
* symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
gdb/testsuite/
* gdb.dwarf2/dw2-unresolved-main.c, gdb.dwarf2/dw2-unresolved.S,
gdb.dwarf2/dw2-unresolved.exp: New.
example, and add a small explanation about it.
(Print Settings): Change the documentation of the "set print
frame-arguments" to reflect the fact that the default is now "scalars".
mi_run_to_main. Skip thread exit test on remote targets.
* gdb.mi/mi-nsintrall.exp: Don't check isnative. Use
mi_run_to_main.
* gdb.mi/mi-nsmoribund.exp: Don't check isnative. Use
mi_run_to_main.
* lib/mi-support.exp (mi_gdb_target_cmd): Remove trailing anchor
when expecting ^connected. Detect when the target doesn't support
non-stop mode.
(mi_run_cmd): Detect if non-stop mode was requested by isn't
supported. Return -1 on error, 0 on success.
(mi_runto_helper): Don't expect a stop if mi_run_cmd failed.
(mi_runto): Return mi_runto_helper's result explicitly.
Implement the multiprocess extensions, and add linux multiprocess
support.
* server.h (ULONGEST): Declare.
(struct ptid, ptid_t): New.
(minus_one_ptid, null_ptid): Declare.
(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
(ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
(struct inferior_list_entry): Change `id' type from unsigned from
to ptid_t.
(struct sym_cache, struct breakpoint, struct
process_info_private): Forward declare.
(struct process_info): Declare.
(current_process): Declare.
(all_processes): Declare.
(initialize_inferiors): Declare.
(add_thread): Adjust to use ptid_t.
(thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
(add_process, remove_process, find_thread_pid): Declare.
(find_inferior_id): Adjust to use ptid_t.
(cont_thread, general_thread, step_thread): Change type to ptid_t.
(multi_process): Declare.
(push_event): Adjust to use ptid_t.
(read_ptid, write_ptid): Declare.
(prepare_resume_reply): Adjust to use ptid_t.
(clear_symbol_cache): Declare.
* inferiors.c (all_processes): New.
(null_ptid, minus_one_ptid): New.
(ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
(ptid_get_tid, ptid_equal, ptid_is_pid): New.
(add_thread): Change unsigned long to ptid. Remove gdb_id
parameter. Adjust.
(thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
(gdb_id_to_thread): Rename to ...
(find_thread_pid): ... this. Change unsigned long to ptid.
(gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
(loaded_dll, pull_pid_from_list): Adjust.
(add_process, remove_process, find_process_pid)
(get_thread_process, current_process, initialize_inferiors): New.
* target.h (struct thread_resume) <thread>: Change type to ptid_t.
(struct target_waitstatus) <related_pid>: Ditto.
(struct target_ops) <kill, detach>: Add `pid' argument. Change
return type to int.
(struct target_ops) <join>: Add `pid' argument.
(struct target_ops) <thread_alive>: Change pid's type to ptid_t.
(struct target_ops) <wait>: Add `ptid' field. Change return type
to ptid.
(kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
(mywait): Add `ptid' argument. Change return type to ptid_t.
(target_pid_to_str): Declare.
* target.c (set_desired_inferior): Adjust to use ptids.
(mywait): Add new `ptid' argument. Adjust.
(target_pid_to_str): New.
* mem-break.h (free_all_breakpoints): Declare.
* mem-break.c (breakpoints): Delelete.
(set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
(check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
to use per-process breakpoint list.
(free_all_breakpoints): New.
* remote-utils.c (struct sym_cache) <name>: Drop `const'.
(symbol_cache, all_symbols_looked_up): Delete.
(hexchars): New.
(ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
read_ptid): New.
(prepare_resume_reply): Change ptid argument's type from unsigned
long to ptid_t. Adjust. Implement W;process and X;process.
(free_sym_cache, clear_symbol_cache): New.
(look_up_one_symbol): Adjust to per-process symbol cache. *
* server.c (cont_thread, general_thread, step_thread): Change type
to ptid_t.
(attached): Delete.
(multi_process): New.
(last_ptid): Change type to ptid_t.
(struct vstop_notif) <ptid>: Change type to ptid_t.
(queue_stop_reply, push_event): Change `ptid' argument's type to
ptid_t.
(discard_queued_stop_replies): Add `pid' argument.
(start_inferior): Adjust to use ptids. Adjust to mywait interface
changes. Don't reference the `attached' global.
(attach_inferior): Adjust to mywait interface changes.
(handle_query): Adjust to use ptids. Parse GDB's qSupported
features. Handle and report "multiprocess+". Handle
"qAttached:PID".
(handle_v_cont): Adjust to use ptids. Adjust to mywait interface
changes.
(handle_v_kill): New.
(handle_v_stopped): Adjust to use target_pid_to_str.
(handle_v_requests): Allow multiple attaches and runs when
multiprocess extensions are in effect. Handle "vKill".
(myresume): Adjust to use ptids.
(queue_stop_reply_callback): Add `arg' parameter. Handle it.
(handle_status): Adjust to discard_queued_stop_replies interface
change.
(first_thread_of, kill_inferior_callback)
(detach_or_kill_inferior_callback, join_inferiors_callback): New.
(main): Call initialize_inferiors. Adjust to use ptids, killing
and detaching from all inferiors. Handle multiprocess packet
variants.
* linux-low.h: Include gdb_proc_service.h.
(struct process_info_private): New.
(struct linux_target_ops) <pid_of>: Use ptid_get_pid.
<lwpid_of>: Use ptid_get_lwp.
(get_lwp_thread): Adjust.
(struct lwp_info): Add `dead' member.
(find_lwp_pid): Declare.
* linux-low.c (thread_db_active): Delete.
(new_inferior): Adjust comment.
(inferior_pid): Delete.
(linux_add_process): New.
(handle_extended_wait): Adjust.
(add_lwp): Change unsigned long to ptid.
(linux_create_inferior): Add process to processes table. Adjust
to use ptids. Don't set new_inferior here.
(linux_attach_lwp): Rename to ...
(linux_attach_lwp_1): ... this. Add `initial' argument. Handle
it. Adjust to use ptids.
(linux_attach_lwp): New.
(linux_attach): Add process to processes table. Don't set
new_inferior here.
(struct counter): New.
(second_thread_of_pid_p, last_thread_of_process_p): New.
(linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
multiple processes.
(linux_kill): Add `pid' argument. Handle it. Adjust to multiple
processes. Remove process from process table.
(linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
to multiple processes.
(any_thread_of): New.
(linux_detach): Add `pid' argument, and handle it. Remove process
from processes table.
(linux_join): Add `pid' argument. Handle it.
(linux_thread_alive): Change unsighed long argument to ptid_t.
Consider dead lwps as not being alive.
(status_pending_p): Rename `dummy' argument to `arg'. Filter out
threads we're not interested in.
(same_lwp, find_lwp_pid): New.
(linux_wait_for_lwp): Change `pid' argument's type from int to
ptid_t. Adjust.
(linux_wait_for_event): Rename to ...
(linux_wait_for_event_1): ... this. Change `pid' argument's type
from int to ptid_t. Adjust.
(linux_wait_for_event): New.
(linux_wait_1): Add `ptid' argument. Change return type to
ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
that exit from the process table.
(linux_wait): Add `ptid' argument. Change return type to ptid_t.
Adjust.
(mark_lwp_dead): New.
(wait_for_sigstop): Adjust to use ptids. If a process exits while
stopping all threads, mark its main lwp as dead.
(linux_set_resume_request, linux_resume_one_thread): Adjust to use
ptids.
(fetch_register, usr_store_inferior_registers)
(regsets_fetch_inferior_registers)
(regsets_store_inferior_registers, linux_read_memory)
(linux_write_memory): Inline `inferior_pid'.
(linux_look_up_symbols): Adjust to use per-process
`thread_db_active'.
(linux_request_interrupt): Adjust to use ptids.
(linux_read_auxv): Inline `inferior_pid'.
(initialize_low): Don't reference thread_db_active.
* gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
* proc-service.c (ps_lgetregs): Use find_lwp_pid.
(ps_getpid): Return the pid of the current inferior.
* thread-db.c (proc_handle, thread_agent): Delete.
(thread_db_create_event, thread_db_enable_reporting): Adjust to
per-process data.
(find_one_thread): Change argument type to ptid_t. Adjust to
per-process data.
(maybe_attach_thread): Adjust to per-process data and ptids.
(thread_db_find_new_threads): Ditto.
(thread_db_init): Ditto.
* spu-low.c (spu_create_inferior, spu_attach): Add process to
processes table. Adjust to use ptids.
(spu_kill, spu_detach): Adjust interface. Remove process from
processes table.
(spu_join, spu_thread_alive): Adjust interface.
(spu_wait): Adjust interface. Remove process from processes
table. Adjust to use ptids.
* win32-low.c (current_inferior_tid): Delete.
(current_inferior_ptid): New.
(debug_event_ptid): New.
(thread_rec): Take a ptid. Adjust.
(child_add_thread): Add `pid' argument. Adjust to use ptids.
(child_delete_thread): Ditto.
(do_initial_child_stuff): Add `attached' argument. Add process to
processes table.
(child_fetch_inferior_registers, child_store_inferior_registers):
Adjust.
(win32_create_inferior): Pass 0 to do_initial_child_stuff.
(win32_attach): Pass 1 to do_initial_child_stuff.
(win32_kill): Adjust interface. Remove process from processes
table.
(win32_detach): Ditto.
(win32_join): Adjust interface.
(win32_thread_alive): Take a ptid.
(win32_resume): Adjust to use ptids.
(get_child_debug_event): Ditto.
(win32_wait): Adjust interface. Remove exiting process from
processes table.
* server.h (non_stop): Declare.
(gdb_client_data, handler_func): Declare.
(delete_file_handler, add_file_handler, start_event_loop):
Declare.
(handle_serial_event, handle_target_event, push_event)
(putpkt_notif): Declare.
* target.h (enum resume_kind): New.
(struct thread_resume): Replace `step' field by `kind' field.
(TARGET_WNOHANG): Define.
(struct target_ops) <wait>: Add `options' argument.
<supports_non_stop, async, start_non_stop>: New fields.
(target_supports_non_stop, target_async): New.
(start_non_stop): Declare.
(mywait): Add `options' argument.
* target.c (mywait): Add `options' argument. Print child exit
notifications here.
(start_non_stop): New.
* server.c (non_stop, own_buf, mem_buf): New globals.
(struct vstop_notif): New.
(notif_queue): New global.
(queue_stop_reply, push_event, discard_queued_stop_replies)
(send_next_stop_reply): New.
(start_inferior): Adjust to use resume_kind. Adjust to mywait
interface changes.
(attach_inferior): In non-stop mode, don't wait for the target
here.
(handle_general_set): Handle QNonStop.
(handle_query): When handling qC, return the current general
thread, instead of the first thread of the list.
(handle_query): If the backend supports non-stop mode, include
QNonStop+ in the qSupported query response.
(handle_v_cont): Adjust to use resume_kind. Handle resume_stop
and non-stop mode.
(handle_v_attach, handle_v_run): Handle non-stop mode.
(handle_v_stopped): New.
(handle_v_requests): Report support for vCont;t. Handle vStopped.
(myresume): Adjust to use resume_kind. Handle non-stop.
(queue_stop_reply_callback): New.
(handle_status): Handle non-stop mode.
(main): Clear non_stop flag on reconnection. Use the event-loop.
Refactor serial protocol handling from here ...
(process_serial_event): ... to this new function. When GDB
selects any thread, select one here. In non-stop mode, wait until
GDB acks all pending events before exiting.
(handle_serial_event, handle_target_event): New.
* remote-utils.c (remote_open): Install remote_desc in the event
loop.
(remote_close): Remove remote_desc from the event loop.
(putpkt_binary): Rename to...
(putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
(putpkt_binary): New as wrapper around putpkt_binary_1.
(putpkt_notif): New.
(prepare_resume_reply): In non-stop mode, don't change the
general_thread.
* event-loop.c: New.
* Makefile.in (OBJ): Add event-loop.o.
(event-loop.o): New rule.
* linux-low.h (pid_of): Moved here.
(lwpid_of): New.
(get_lwp_thread): Use lwpid_of.
(struct lwp_info): Delete `lwpid' field. Add `suspended' field.
* linux-low.c (pid_of): Delete.
(inferior_pid): Use lwpid_of.
(linux_event_pipe): New.
(target_is_async_p): New.
(delete_lwp): New.
(handle_extended_wait): Use lwpid_of.
(add_lwp): Don't set lwpid field.
(linux_attach_lwp): Adjust debug output. Use lwpid_of.
(linux_kill_one_lwp): If killing a running lwp, stop it first.
Use lwpid_of. Adjust to linux_wait_for_event interface changes.
(linux_detach_one_lwp): If detaching from a running lwp, stop it
first. Adjust to linux_wait_for_event interface changes. Use
lwpid_of.
(linux_detach): Don't delete the main lwp here.
(linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
(status_pending_p): Don't consider explicitly suspended lwps.
(linux_wait_for_lwp): Take an integer pid instead of a lwp_info
pointer. Add OPTIONS argument. Change return type to int. Use
my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
(linux_wait_for_event): Take an integer pid instead of a lwp_info
pointer. Add status pointer argument. Return a pid instead of a
status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
changes. In non-stop mode, don't switch to a random thread.
(linux_wait): Rename to...
(linux_wait_1): ... this. Add target_options argument, and handle
it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
don't handle the continue thread. Handle TARGET_WNOHANG. Merge
clean exit and signal exit code. Don't stop all threads in
non-stop mode. In all-stop mode, only stop all threads when
reporting a stop to GDB. Handle explicit thread stop requests.
(async_file_flush, async_file_mark): New.
(linux_wait): New.
(send_sigstop): Use lwpid_of.
(wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
interface changes. In non-stop mode, don't switch to a random
thread.
(linux_resume_one_lwp): Use lwpid_of.
(linux_continue_one_thread, linux_queue_one_thread): Merge into ...
(linux_resume_one_thread): ... this. Handle resume_stop. In
non-stop mode, don't look for pending flag in all threads.
(resume_status_pending_p): Don't consider explicitly suspended
threads.
(my_waitpid): Reimplement. Emulate __WALL.
(linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
Use lwpid_of.
(sigchld_handler, linux_supports_non_stop, linux_async)
(linux_start_non_stop): New.
(linux_target_ops): Register linux_supports_non_stop, linux_async
and linux_start_non_stop.
(initialize_low): Install SIGCHLD handler.
* thread-db.c (thread_db_create_event, find_one_thread)
(thread_db_get_tls_address): Use lwpid_of.
* win32-low.c (win32_detach): Adjust to use resume_kind.
(win32_wait): Add `options' argument.
* spu-low.c (spu_resume): Adjust to use resume_kind.
(spu_wait): Add `options' argument.
* target.h (enum target_waitkind): New.
(struct target_waitstatus): New.
(struct target_ops) <wait>: Return an unsigned long. Take a
target_waitstatus pointer instead of a char pointer.
(mywait): Likewise.
* target.c (mywait): Change prototype to return an unsigned long.
Take a target_waitstatus pointer instead of a char pointer. Adjust.
* server.h (thread_from_wait, old_thread_from_wait): Delete
declarations.
(prepare_resume_reply): Change prototype to take a
target_waitstatus.
* server.c (thread_from_wait, old_thread_from_wait): Delete.
(last_status, last_ptid): New.
(start_inferior): Remove "statusptr" argument. Adjust. Return a
pid instead of a signal.
(attach_inferior): Remove "status" and "signal" parameters.
Adjust.
(handle_query): For qGetTLSAddr, parse the thread id with strtol,
not as an address.
(handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
(handle_v_requests, myresume): Remove "status" and "signal"
parameters. Adjust.
(handle_status): New.
(main): Delete local `status'. Adjust.
* remote-utils.c: Include target.h.
(prepare_resume_reply): Change prototype to take a
target_waitstatus. Adjust.
* linux-low.c (linux_wait): Adjust to new target_ops->wait
interface.
* spu-low.c (spu_wait): Adjust.
* win32-low.c (enum target_waitkind, struct target_waitstatus):
Delete.
(win32_wait): Adjust.
(struct target_ops): Add a `n' argument to the `resume' callback.
* server.c (start_inferior): Adjust.
(handle_v_cont, myresume): Adjust.
* linux-low.c (check_removed_breakpoint): Adjust to resume
interface change, and to removed leave_stopped field.
(resume_ptr): Delete.
(struct thread_resume_array): New.
(linux_set_resume_request): Add new `arg' parameter. Adjust to
resume interface change.
(linux_continue_one_thread, linux_queue_one_thread)
(resume_status_pending_p): Check if the resume field is NULL
instead of checking the leave_stopped member.
(linux_resume): Adjust to the target resume interface change.
* spu-low.c (spu_resume): Adjust to the target resume interface
change.
* win32-low.c (win32_detach, win32_resume): Ditto.
* linux-low.c (linux_wait_for_event): Don't clear the `stepping'
flag.
(wait_for_sigstop): Don't leave a finished single-step SIGTRAP
pending.
(linux_continue_one_thread): Only preserve the stepping flag if
there's a pending breakpoint.
gdb/testsuite/
* gdb.threads/pending-step.c, gdb.threads/pending-step.exp: New.
* gdb.base/call-ar-st.exp: Set print frame-arguments to "all".
* gdb.ada/ref_param.exp: Set print frame-arguments to "all".
* gdb.ada/lang_switch.exp: Set print frame-arguments to "all".
if the thread's ptid without a thread id field is in the list
before calling thread_change_ptid.
(extended_remote_attach_1): In non-stop mode, do not rely on
querying the current thread, instead, query the thread list, and
select the first thread of the process.
* gdbthread.h (first_thread_of_process): Declare.
* thread.c (first_thread_of_process): Define.
Change gdb.Value.address from a method to an attribute.
* python/python-value.c (value_object): Add `address' element.
(valpy_dealloc): Decrement reference to self->address if set.
(valpy_new): Initialize val_obj->address.
(valpy_address): Rename to ...
(valpy_get_address): ... this. Change signature from method to
attribute. Update self->address if not set.
(value_to_value_object): Initialize val_obj->address.
(value_object_getset): Add `address' element.
(value_object_methods): Remove `address' element.
gdb/testsuite/
* gdb.python/python-value.exp: Add tests for the address
attribute.
gdb/doc/
* gdb.texinfo (Values From Inferior): Change gdb.Value.address
from a method to an attribute.
target_has_stack.
* mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
when there is no thread selected.
(mi_cmd_execute): Don't special case commands that can run without
a valid selected thread.
* top.c (execute_command): Don't special case commands that can
run without a valid selected thread. Use has_stack_frames.
* infcmd.c (ensure_valid_thread): New.
(continue_1, step_1, jump_command, signal_command): Use it.
(detach_command): Error out if there's no selected thread/inferior.
* thread.c (print_thread_info): Allow having no thread selected.
(switch_to_thread): Don't read the PC if there is no current thread.
(do_restore_current_thread_cleanup): Don't record the current
frame if there is no current thread.
(make_cleanup_restore_current_thread): Don't read frame info if
there is no selected thread.
(_initialize_thread): Don't mark commands as
"no_selected_thread_ok".
* frame.c (get_current_frame): Error out if there is no valid
selected thread.
(has_stack_frames): Return false if there is no valid
selected thread.
* cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
"no_selected_thread_ok".
* cli/cli-decode.c (set_cmd_no_selected_thread_ok)
(get_cmd_no_selected_thread_ok): Delete.
* cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
(set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
Delete declaration.
* stack.c (get_selected_block): Use has_stack_frames.
Fix size of FPSCR in Power 7 processors.
* ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
(PPC_FEATURE_HAS_DFP): New #define.
(ppc_linux_read_description): Check for DFP feature instead of
ISA 2.05 to decide on size of the FPSCR.
gdbserver/
Fix size of FPSCR in Power 7 processors.
* linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
(PPC_FEATURE_HAS_DFP): New #define.
(ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
size of the FPSCR.
(prologue-value.h): Include.
(mn10300_frame_unwind_cache, set_reg_offsets): Delete.
(struct mn10300_prologue): Define.
(push_reg, translate_rreg, check_for_saved): New functions.
(mn10300_analyze_prologue): Rewrite, using prologue-value
machinery. Handle more instructions than before. Permit
instructions to occur in any order.
(mn10300_skip_prologue): Find the extents of the function
in question; mn10300_analyze_prologue no longer does this.
(mn10300_analyze_frame_prologue): New function.
(mn10300_frame_base): New function.
(mn10300_frame_this_id): Rewrite, no longer using trad-frame
implementation.
(mn10300_frame_prev_register): Likewise.
(mn10300_frame_base_address, mn10300_frame_base struct): Delete.
(mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
`this_frame'.
(mn10300_frame_unwind_init): Don't call frame_base_set_default().
* gdb/completer.h (gdb_completion_word_break_characters): New function.
* gdb/completer.c: Include gdb_assert.h.
(complete_line_internal_reason): New enum.
(complete_line_internal): Change last argument type to
complete_line_internal_reason.
Modify function to handle the different complete_line_internal_reason
argument values.
(complete_line): Adapt to change in complete_line_internal.
(command_completer): Ditto.
(gdb_completion_word_break_characters): Implement new function.
* top.c (init_main): Set rl_completion_word_break_hook to
gdb_completion_word_break_characters.
dynamically loaded function.
(LookupPrivilegeValueA): Ditto.
(OpenProcessToken): Ditto.
(AdjustTokenPrivileges): Rename and define placeholder for address of
dynamically loaded function.
(LookupPrivilegeValueA): Ditto.
(OpenProcessToken): Ditto.
(set_process_privilege): Remove check for loaded functions.
(bad_OpenProcessToken): Define.
(_initialize_loadable): Load token functions from advapi here, setting
OpenProcessToken function to a dummy static function which always return error
if OS doesn't support this functionality.
* mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
to the about_to_proceed observer notification.
(mi_about_to_proceed): New.
(mi_on_resume): Only output ^running and the prompt here if the
target was proceeded.
* breakpoint.c (breakpoint_proceeded): New static.
(breakpoint_about_to_proceed): New.
(_initialize_breakpoints): Attach breakpoint_about_to_proceed to
the about_to_proceed observer notification.
* inferior.h (breakpoint_proceeded): Delete declaration.
* infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
Notify the about_to_proceed observers.
(struct inferior_status): Delete breakpoint_proceeded member.
(save_inferior_status): Don't save it.
(restore_inferior_status): Don't restore it.
* mi-main.h (mi_proceeded): Declare.
* mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
a command.
gdb/doc/
* observer.texi (about_to_proceed): New.
* gdbint.texinfo (everywhere): Use braces {} in @deftypeXX type
field throughout to handle types with spaces in them. Fix typos
found by aspell.
(Summary, Requirements, Contributors): New first chapter,
"Summary" added, old Requirements section moved there, and new
section, "Contributors" added.
(Initializing a New Architecture, Register Representation)
(Frame Interpretation, Inferior Call Setup, Adding a New Target)
(Porting gdb): These sections extended and updated.
(Compiler Characteristics): This section (empty) deleted.
(Defining Other Architecture Features): This section renamed and
duplicate material removed from (formerly "Target Conditionals").
Use braces {} in @deftypeXX type field throughout to handle types
with spaces in them. Typos found by aspell fixed.
* stack_frame.svg: New file, source of image for gdbint.texinfo.
* stack_frame.pdf: Version of image for PDF output.
* stack_frame.png: Version of image for HTML output and for Emacs.
* stack_frame.txt: Version of image for Info output.
2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Jim Blandy <jimb@red-bean.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
Tom Tromey <tromey@redhat.com>
Miscellaneous fixes to the Python code.
* python/python-cmd.c (cmdpy_init): Accept keyword
arguments.
* python/python-value.c (valpy_string): Accept keyword
arguments.
(valpy_binop): Use `break' to exit from the TRY_CATCH block.
Do not call value_to_value_object on NULL RES_VAL.
(value_object_methods): Change `string' entry to also accept
keyword arguments.
(convert_value_from_python): Return a copy of the value if obj is
a gdb.Value object.
(value_object_methods): Mark the `string' method as accepting
keywords, and show method "prototype" in the doc string.
* python/python.c (get_parameter): Don't return inside a
TRY_CATCH.
gdb/doc/
2009-03-21 Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.texinfo (Values From Inferior): Fix optional arguments
markup.
(Commands In Python): Adjust argument names of gdb.Command.__init__
to what the function accepts as keywords.
gdb/testsuite/
2009-03-21 Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.python/python-cmd.exp: Add tests for keyword arguments.
* gdb.python/python-function.exp: Add test for function returning
a GDB value.
Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (process_die): Handle DW_TAG_typedef.
* eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
typedef.
* ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
SYMBOL_TYPE result.
* ada-typeprint.c (print_array_type): Do the NULL check
unconditionally.
(init): Delete.
(func): Delete definition and provide extern declaration.
(t): New.
(main): Don't call printf. Call func and store its result in t.
* return-nodebug1.c: New.
* return-nodebug.exp: Don't expect stdio output. Instead, print
the global variable t. Drop printf formatters and cast types from
foreach loop. Don't use prepare_for_testing. Compile
return-nodebug.c and return-nodebug1.c in separate steps. Don't
define FORMAT or CAST.
(disassemble_next_line): New enum.
(show_disassemble_next_line): New function. Show the current
value of disassemble-next-line.
(gdb_disassembly_stub_args): New struct for argument passing
between function do_gdb_disassembly and function
gdb_disassembly_stub.
(gdb_disassembly_stub): New function. Helper for
gdb_disassembly.
(do_gdb_disassembly): New function. Use TRY_CATCH to catch
the exception from the gdb_disassembly because it will be
broken by filter sometime.
(print_frame_info): If disassemble-next-line is set to auto
or on and doesn't have the line debug messages for $pc,
output the next instruction.
If disassemble-next-line is set to on and there is line debug
messages, output assembly codes for next line.
(_initialize_stack): Make the "set disassemble-next-line"
command an auto-boolean command. Change its class to
class_stack. Place it in the top level set list. Extend help
to describe the auto mode.
Use the ops parameter to get to the target beneath, rather than
using the current_target global. Using the current_target global
was an unintended accident.
global. This brings back to life the AIX port which was otherwise
crashing all the time.
* aix-thread.c (base_target): Delete.
(pd_enable): Do not set base_target.
(aix_thread_attach): Use find_target_beneath instead of base_target.
(aix_thread_detach, aix_thread_resume, aix_thread_wait)
(aix_thread_fetch_registers, aix_thread_store_registers),
(aix_thread_xfer_partial, aix_thread_mourn_inferior)
(aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
(aix_thread_kill): Delete. Does not seem necessary.
(init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
* stack.c (return_command <retval_exp>): New variables retval_expr
and old_chain. Inline parse_and_eval to initialize retval_expr. Check
RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
if RETURN_TYPE is NULL.
gdb/doc/
* gdb.texinfo (Returning): New description for missing debug info.
gdb/testsuite/
* gdb.base/return-nodebug.exp, gdb.base/return-nodebug.c: New.
* gdb.base/multi-forks.exp (continue_to_exit_bp_loc): New function with
code from `follow parent, print pids'.
(`follow child, print pids', `follow parent, print pids'): Call it.
Replace `gdb_test "break..."' by gdb_breakpoint.
gdb/
* remote.c (PACKET_qAttached): New.
(remote_query_attached): New.
(remote_add_inferior): Add new `attached' argument. Handle it.
(remote_notice_new_inferior, remote_start_remote): Adjust to pass
-1 to remote_add_inferior in new parameter.
(extended_remote_attach_1): Adjust to pass 1 to
remote_add_inferior in the new parameter.
(extended_remote_create_inferior_1): Adjust to pass 0 to
remote_add_inferior in the new parameter.
(_initialize_remote): Add "set/show remote query-attached-packet"
commands.
2009-03-14 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
* server.c (handle_query): Handle "qAttached".
2009-03-14 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
* gdb.texinfo (Remote Configuration): Document query-attached.
(General Query Packets): Document qAttached.
* ada-lang.c (ada_modulus_from_name): New function.
(ada_modulus): In the case where the type length is bigger than
the size of the type used to hold the bounds, try determining
the modulus from the type name.
(ada_value_primitive_packed_val): Fix bug in the computation of
ntarg causing an out-of-buffer invalid access.
the profile of some target_ops methods.
* darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
where missing.
(darwin_stop_inferior, darwin_detach): Likewise.
of some of the "methods" in the target_ops structure.
* aix-thread.c: Add missing target_ops parameter throughout.
Implement Ada task switching on AIX.
* aix-thread.c (aix_thread_get_ada_task_ptid): New function.
(init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
* solib.c (solib_contains_address_p): New function.
(solib_name_from_address): Use it.
* printcmd.c (display_uses_solib_p): Use it.
* solib.h (solib_contains_address_p): Declare it.
* dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
Move the variable `macinfo_type' out of the loop. Create a new
processing pass before the current one to pre-create `current_file'.
New complaint on misplaced zero/non-zero definitions/includes.
Skip first DW_MACINFO_start_file with `at_commandline' set.
* printcmd.c (do_one_display): Reparse exp_string.
(display_uses_solib_p): New function.
(clear_dangling_display_expressions): New function.
(_initialize_printcmd): Add observer.
* solib.c (no_shared_libraries): Swap order of calls to
clear_solib and objfile_purge_solibs.
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.
* infcmd.c (notice_new_inferior): New.
* remote.c (remote_add_inferior, remote_add_thread): New.
(notice_new_inferiors): Rename to...
(remote_notice_new_inferior): ... this. Add RUNNING argument.
Use remote_add_thread instead of add_thread, passing it the
RUNNING argument. Add an inferior with remote_add_inferior. If
we just learned about an inferior, call notice_new_inferior.
(record_currthread): Adjust.
(remote_threads_info): Adjust to use remote_notice_new_inferior.
(remote_start_remote, extended_remote_attach_1): Use remote_add_inferior.
(process_stop_reply): Adjust. Call remote_notice_new_inferior
after handling expedited registers and watchpoint state.
(extended_remote_create_inferior_1): Use remote_add_inferior.
* python/python-utils.c (python_string_to_unicode): Always return
a new reference.
(python_string_to_target_string): Decrement transient python
instance.
(python_string_to_host_string): Likewise.
Silence a few -Wmissing-prototypes warnings.
PR build/9877:
* amd64-nat.c: Include "amd64-nat.h".
* fork-child.c (_initialize_fork_child): Ditto.
* gcore.c (_initialize_gcore): Ditto.
* inf-ptrace.c: Include "inf-ptrace.h".
(inf_ptrace_store_registers): Make it static.
* linux-nat.c (linux_nat_terminal_ours): Make it static.
(_initialize_linux_nat): Declare before definition.
* linux-tdep.c: Include "linux-tdep.h".
* linux-thread-db.c (_initialize_thread_db): Declare before
definition.
* proc-service.c (_initialize_proc_service): Ditto.
* remote.c (remote_send_printf): Make it static.
* solib.c: Include "solib.h".
* symfile-mem.c (_initialize_symfile_mem): Declare before
definition.
* ada-lang.c (ada_la_decode, ada_match_name)
(ada_suppress_symbol_printing, ada_is_array_type)
(ada_value_ptr_subscript, ada_array_length)
(ada_to_static_fixed_value): Make them static.
(_initialize_ada_language): Declare before definition.
* ada-tasks.c (ada_get_task_number, ada_get_environment_task)
(ada_task_list_changed, ada_new_objfile_observer): Make them
static.
(_initialize_tasks): Declare before definition.
* addrmap.c (_initialize_addrmap): Declare before definition.
* auxv.c (default_auxv_parse): Make it static.
* bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
them static.
* breakpoint.c (remove_sal): Add line break.
(expand_line_sal_maybe): Make it static.
* cp-name-parser.y: Include "cp-support.h".
* cp-valprint.c (cp_find_class_member): Make it static.
* eval.c (value_f90_subarray): Ditto.
* exceptions.c (print_any_exception): Ditto.
* findcmd.c (_initialize_mem_search): Declare before definition.
* frame.c (frame_observer_target_changed): Make it static.
* gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
* inf-child.c: Include "inf-child.h".
* inferior.h (valid_inferior_id): Rename to ...
(valid_gdb_inferior_id): ... this.
* infrun.c (infrun_thread_stop_requested, siginfo_make_value):
Make them static.
* jv-lang.c (java_language_arch_info): Make it static.
* m2-typeprint.c (m2_get_discrete_bounds): Ditto.
* osdata.c (info_osdata_command): Make it static.
* regcache.c (regcache_observer_target_changed): Make it static.
* reverse.c (_initialize_reverse): Declare before definition.
* stabsread.c (cleanup_undefined_types_noname)
(cleanup_undefined_types_1): Make them static.
* symfile.c (place_section): Make it static.
* symtab.c (find_pc_sect_psymtab_closer): Make it static.
* target-descriptions.c (_initialize_target_descriptions): Declare
before definition.
* target.c (default_get_ada_task_ptid, find_default_can_async_p)
(find_default_is_async_p, find_default_supports_non_stop): Make
them static.
(target_supports_non_stop): Add prototype.
(dummy_pid_to_str): Make it static.
* utils.c (_initialize_utils): Declare before definition.
* ada-exp.y (_initialize_ada_exp): Declare before definition.
* solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
* target.h (struct target_ops): Add a prototype to the
to_can_execute_reverse callback.
* macroscope.c (_initialize_macroscope): Declare before definition.
* cp-namespace.c (_initialize_cp_namespace): Declare before definition.
* python/python.c (_initialize_python): Declare before definition.
* tui/tui-command.c: Include "tui/tui-command.h".
* tui/tui-data.c (init_content_element, init_win_info): Make them
static.
* tui/tui-disasm.c: Include "tui/tui-disasm.h".
* tui/tui-interp.c (_initialize_tui_interp): Declare before
definition.
* tui/tui-layout.c: Include "tui/tui-layout.h".
(_initialize_tui_layout): Declare before definition.
* tui/tui-regs.c: Include "tui/tui-regs.h".
(tui_display_reg_element_at_line): Make it static.
(_initialize_tui_regs): Declare before definition.
* tui/tui-stack.c (_initialize_tui_stack): Declare before
definition.
* tui/tui-win.c: Include "tui/tui-win.h".
(_initialize_tui_win): Declare before definition.
(tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
* tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
(tui_get_cmd_list): Add a prototype.
* tui/tui-windata.c: Include tui-windata.h.
* tui/tui-wingeneral.c (box_win): Make it static.
* cli/cli-logging.c (show_logging_command): Make it static.
(_initialize_cli_logging): Declare before definition.
* mi/mi-common.c (_initialize_gdb_mi_common): Declare before
definition.
(mi_interpreter_init): Register the above.
* solib.c (clear_solib): Notify solib unload.
* breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
disable breakpoints on a.out targets.
All callers updated.
(amd64_get_insn_details): Handle more 3-byte opcode insns.
(amd64_breakpoint_p): Delete.
(amd64_displaced_step_fixup): When fixing up after stepping an int3,
don't back up pc to the start of the int3.
* i386-tdep.c: #include opcode/i386.h.
(i386_skip_prefixes): New function.
(i386_absolute_jmp_p): Constify argument.
(i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
(i386_breakpoint_p): Delete.
(i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
When fixing up after stepping an int3, don't back up pc to the start
of the int3.
* gdb.arch/amd64-disp-step.S (test_int3): New test.
* gdb.arch/amd64-disp-step.exp (test_int3): New test.
* gdb.arch/i386-disp-step.S (test_prefixed_abs_jump): New test.
(test_prefixed_syscall,test_int3): New tests.
* gdb.arch/i386-disp-step.exp (test_prefixed_abs_jump): New test.
(test_prefixed_syscall,test_int3): New tests.
(core_open): Find core threads before calling
post_create_inferior.
(add_to_thread_list, get_core_register_section): Take into account
systems where the regset section names encode the pid of the
inferior.
* gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
* gdbarch.h, gdbarch.c: Regenerate.
* amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
* i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
* ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
* infcmd.c (finish_command_continuation): Pass '1' for
'print_frame' parameter to the observer.
* infrun.c (normal_stop): Don't print mi-specific information
here. Pass 'stop_print_frame' to the 'print_frame' parameter
of the observer.
* mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
If we need to print frame, and current uiout is not the MI one,
print frame again.
(get_integer_valueof): New procedure.
(get_sizeof): Use new get_integer_value_of.
* gdb.base/sizeof.exp: Replace all uses of get_valueof
by get_integer_valueof.
* p-lang.c (is_pascal_string_type): Fix comment.
Determine exact size of char elements for GPC
strings.
(pascal_printstr): Handle char width of 2 or 4.
* p-valprint.c (pascal_val_print): Handle char
of width 2 or 4.
inside the loop. Only call addrmap_set_empty if the compilation unit
had DW_AT_high_pc and DW_AT_low_pc. Update call to
scan_partial_symbols.
(scan_partial_symbols): Take NEED_PC argument and pass it along with
LOWPC and HIGHPC.
(add_partial_namespace): Take NEED_PC argument and pass it through.
(add_partial_subprogram): Take NEED_PC argument. Update the addrmap
if necessary.
inside the loop. Only call addrmap_set_empty if the compilation unit
had DW_AT_high_pc and DW_AT_low_pc. Update call to
scan_partial_symbols.
(scan_partial_symbols): Take NEED_PC argument and pass it along with
LOWPC and HIGHPC.
(add_partial_namespace): Take NEED_PC argument and pass it through.
(add_partial_subprogram): Take NEED_PC argument. Update the addrmap
if necessary.
2009-02-06 Jim Blandy <jimb@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Vladimir Prus <vladimir@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
* defs.h (enum lval_type): New value: lval_computed.
* value.h (struct lval_funcs): New type.
(allocate_computed_value, value_computed_funcs)
(value_computed_closure): New declarations.
* value.c (struct value): Add a structure to the location union
for computed lvalues, containing 'funcs' and 'closure' members.
(allocate_computed_value, value_computed_funcs)
(value_computed_closure): New functions.
(value_free): For computed lvalues, call the closure's
'free_closure' function before freeing the value itself.
(value_copy): If we're copying an lval_computed value, call the
closure's 'copy_closure' function.
(set_value_component_location): If the original value is a
computed lvalue, then call the closure's 'copy_closure' function.
(value_of_internalvar): If an internal variable's value is a
computed lvalue, make retrieving its value produce an equivalent
computed lvalue.
* valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
their read function.
(value_assign): Assign to computed lvalues by calling their write
function.
gdb/doc/
2009-02-06 Pedro Alves <pedro@codesourcery.com>
* gdbint.texinfo (Values): New chapter.
(init_remote_ops): Don't register it.
* target.c (target_get_osdata): Don't check for target_can_run.
Instead any target that has already been pushed, otherwise
fallback to the default run target..
* gdb.base/sigbpt.exp: Detect which signal is received when a NULL
pointer is dereferenced and use this signal name in regexp.
* gdb.base/signull.exp: Ditto.
* gdb.base/sigbpt.c (main): Catch SIGBUS too.
* gdb.base/signull.c (main): Ditto.
* language.h (language_dfn): Add la_get_string member.
(LA_GET_STRING): New macro.
(default_get_string): New prototype.
* language.c (default_get_string): New function.
(unknown_language_defn, auto_language_defn, local_language_defn): Use
default_get_string for la_get_string.
* c-lang.c (c_get_string): New function.
(c_language_defn, cplus_language_defn, asm_language_defn): Use
c_get_string for la_get_string.
(minimal_language_defn): Likewise
* ada-lang.c (ada_language_defn): Likewise.
* f-lang.c (f_language_defn): Use default_get_string for
la_get_string.
* jv-lang.c (java_language_defn): Likewise.
* m2-lang.c (m2_language_defn): Likewise.
* objc-lang.c (objc_language_defn): Likewise.
* p-lang.c (p_language_defn): Likewise.
* scm-lang.c (scm_language_defn): Likewise.
* typeprint.c (type_to_string): New function.
* value.h (type_to_string): New prototype.
* valprint.c (val_print_string): Factor out code for reading string
from the inferior into its own function. Put 2 spaces after period
in comments.
(read_string): New function.
* valprint.h (read_string): New prototype.
Tom Tromey <tromey@redhat.com>
PR breakpoints/8079:
* breakpoint.c (print_one_breakpoint): Use exp_string field
to display expression of watchpoints.
(mention): Likewise.
(watch_command_1): Remove trailing whitespace from expression.
* printcmd.c (struct display) <exp_string>: New field.
(display_command): Set exp_string.
(free_display): Free exp_string.
(clear_displays): Use free_display.
(do_one_display): Print exp_string.
(display_info): Likewise.
2009-02-04 Tom Tromey <tromey@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
Phil Muldoon <pmuldoon@redhat.com>
* python/python-internal.h (gdbpy_get_value_from_history): Rename
prototype to gdbpy_history.
(gdbpy_is_string): Declare.
(python_string_to_host_string): Declare.
* python/python-utils.c (gdbpy_is_string): New function.
(unicode_to_encoded_string): New function.
(unicode_to_target_string): Use it.
(python_string_to_host_string): New function.
* python/python-value.c (valpy_address): New function.
(convert_value_from_python): Use gdbpy_is_string. Change to throw
Python exception instead of a GDB exception on error. Properly check
Python booleans.
(valpy_getitem): Convert field name to host string. Handle array
accesses. Adapt to new behaviour of convert_value_from_python.
(valpy_new): Adapt to new behaviour of convert_value_from_python.
(enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
VALPY_BITXOR, VALPY_BITOR>: New constants.
(valpy_binop): Update. Adapt to new behaviour of
convert_value_from_python.
(valpy_invert): New function.
(valpy_lsh): Likewise.
(valpy_rsh): Likewise.
(valpy_and): Likewise.
(valpy_or): Likewise.
(valpy_xor): Likewise.
(valpy_richcompare): Call convert_value_from_python instead of doing
conversions itself.
(is_intlike, valpy_int, valpy_long, valpy_float): New functions.
(gdbpy_get_value_from_history): Rename
function to gdbpy_history.
(gdbpy_initialize_values): Don't set tp_new.
(value_object_type): Add valpy_new.
(value_object_methods): Add `address' entry.
(value_object_as_number): Update for new methods.
* python/python.c (GdbMethods): Rename entry from
`get_value_from_history' to `history'.
gdb/doc/
2009-02-04 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Basic Python): Document gdb.history.
gdb/testsuite/
2009-02-04 Tom Tromey <tromey@redhat.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.python/python-value.exp: Use `gdb.history' instead of
`gdb.value_from_history'.
(test_value_numeric_ops): Add test for conversion of enum constant.
* gdb.python/python-value.c (enum e): New type.
(evalue): New global.
(main): Use argv.
* i386-darwin-tdep.c (darwin_sigtramp_p): New function.
(i386_darwin_sigcontext_addr): Ditto.
(amd64_darwin_sigcontext_addr): Ditto.
(darwin_dwarf_signal_frame_p): Ditto.
(i386_darwin_init_abi): Handle signal frames, use the const for
sc_num_regs.
(x86_darwin_init_abi_64): Ditto.
2009-02-04 Tristan Gingold <gingold@adacore.com>
* machoread.c (macho_symfile_read): Read minsymtab also from
shared libraries.
(macho_symfile_read): Try to read dwarf2 frame info from main
object file, but not from OSO files.
(macho_symfile_offsets): Update section names for latest BFD
changes.
* i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
(x86_darwin_init_abi_64): Ditto.
* solib-darwin.c: New file.
* solib-darwin.h: New file.
* configure.tgt: Add solib.o solib-darwin.o for Darwin.
* machoread.c (macho_symfile_read): Read minsymtab also from
shared libraries.
(macho_symfile_read): Try to read dwarf2 frame info from main
object file, but not from OSO files.
(macho_symfile_offsets): Update section names for latest BFD
changes.
* i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
(x86_darwin_init_abi_64): Ditto.
* solib-darwin.c: New file.
* solib-darwin.h: New file.
* configure.tgt: Add solib.o solib-darwin.o for Darwin.
(SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails.
(SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain
"# no Tcl configs found".
(SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR.
* gdb/configure.ac (gdbkt): Check both no_tcl/no_tk first, before
doing any further tcl/tk configury. Don't configure gdbtk if
tcl or tk check fails.
* gdb/aclocal.m4: Regenerate.
* gdb/configure: Regenerate.
* gdb/gdbtk/plugins/aclocal.m4: Regenerate.
* gdb/gdbtk/plugins/configure: Regenerate.
* target.c (target_waitstatus_to_string): New function. Copied from
debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
TARGET_WAITKIND_NO_HISTORY.
(debug_to_wait): Call it.
* infrun.c (wait_for_inferior): If debug_infrun, print result of
target_wait.
(fetch_inferior_event): Ditto.
(break_command_really, set_breakpoint): New parameter enabled.
(create_breakpoint, break_command_really): Make breakpoint
disabled if so requested.
* breakpoint.h (set_breakpoint): New parameter enabled.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
(EAX_REG_NUM,ECX_REG_NUM,EDX_REGNUM,EBX_REG_NUM,ESI_REG_NUM)
(EDI_REG_NUM): New macros.
(MODRM_MOD_FIELD,MODRM_REG_FIELD,MODRM_RM_FIELD): New macros.
(SIB_SCALE_FIELD,SIB_INDEX_FIELD,SIB_BASE_FIELD): New macros.
(REG_PREFIX_P): New macro.
* amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
(amd64_displaced_step_fixup): Declare.
* amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
(amd64_arch_regmap): Move out of amd64_analyze_stack_align
and make static global.
(amd64_arch_regmap_len): New static global.
(amd64_arch_reg_to_regnum): New function.
(struct amd64_insn): New struct.
(struct displaced_step_closure): New struct.
(onebyte_has_modrm,twobyte_has_modrm): New static globals.
(rex_prefix_p,skip_prefixes)
(amd64_insn_length_fprintf,amd64_insn_length_init_dis)
(amd64_insn_length,amd64_get_unused_input_int_reg)
(amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
(amd64_displaced_step_copy_insn)
(amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
(amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
(amd64_displaced_step_fixup): New functions.
* amd64-linux-tdep.c: #include arch-utils.h.
(amd64_linux_init_abi): Install displaced stepping support.
* gdb.arch/amd64-disp-step.S: New file.
* gdb.arch/amd64-disp-step.exp: New file.
* gdb.arch/i386-disp-step.S: New file.
* gdb.arch/i386-disp-step.exp: New file.
parent to the child.
* inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
* inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
remove_breakpoints to remove breakpoints from the parent.
finding its unwinder. Use frame_id_build to build the new frame's
id.
* stack.c (parse_frame_specification_1): Correct setting ``addrs''
array values from the ``args'' array values.
(create_array_type, create_set_type, init_flags_type)
(copy_type_recursive): Replace pairs of calls to XALLOC and memset
with a call to XZALLOC or XCALLOC, and pairs of calls to
obstack_alloc and memset with a call to OBSTACK_ZALLOC.