When deleting an inferior, delete the associated program space as well
if it becomes unused. This replaces the "pruning" approach, with which
you could forget to call prune_program_spaces (as seen, with the
-remove-inferior command, see [1]).
This allows to remove the prune_program_spaces function. At the same
time, I was able to clean up the delete_inferior* family:
- delete_inferior is unused
- delete_inferior_silent is only used in monitor_close, but is replaced
with discard_all_inferiors [2], so it becomes unused
- All remaining calls to delete_inferior_1 are with silent=1, so the
parameter is removed
- delete_inferior_1 is renamed to delete_inferior
I renamed pspace_empty_p to program_space_empty_p. I prefer if the
"exported" functions have a more explicit and standard name.
Tested on Ubuntu 14.10.
[1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html
[2] See https://sourceware.org/ml/gdb-patches/2015-07/msg00228.html and
follow-ups for details.
gdb/Changelog:
* inferior.c (delete_inferior_1): Rename to ...
(delete_inferior): ..., remove 'silent' parameter, delete
program space when unused and remove call to prune_program_spaces.
Remove the old, unused, delete_inferior.
(delete_inferior_silent): Remove.
(prune_inferiors): Change call from delete_inferior_1 to
delete_inferior and remove 'silent' parameter. Remove call to
prune_program_spaces.
(remove_inferior_command): Idem.
* inferior.h (delete_inferior_1): Rename to...
(delete_inferior): ..., remove 'silent' parameter and remove the
original delete_inferior.
(delete_inferior_silent): Remove.
* mi/mi-main.c (mi_cmd_remove_inferior): Change call from
delete_inferior_1 to delete_inferior and remove 'silent'
parameter.
* progspace.c (prune_program_spaces): Remove.
(pspace_empty_p): Rename to...
(program_space_empty_p): ... and make non-static.
(delete_program_space): New.
* progspace.h (prune_program_spaces): Remove declaration.
(program_space_empty_p): New declaration.
(delete_program_space): New declaration.
* monitor.c (monitor_close): Replace call to
delete_thread_silent and delete_inferior_silent with
discard_all_inferiors.
When deleting an inferior, delete the associated program space as well
if it becomes unused. This replaces the "pruning" approach, with which
you could forget to call prune_program_spaces (as seen, with the
-remove-inferior command, see [1]).
This allows to remove the prune_program_spaces function. At the same
time, I was able to clean up the delete_inferior* family.
delete_inferior_silent and delete_inferior were unused, which allowed
renaming delete_inferior_1 to delete_inferior. Also, since all calls to
it were with silent=1, I removed that parameter completely.
I renamed pspace_empty_p to program_space_empty_p. I prefer if the
"exported" functions have a more explicit and standard name.
Tested on Ubuntu 14.10.
This obsoletes my previous patch "Add call to prune_program_spaces in
mi_cmd_remove_inferior" [1].
[1] https://sourceware.org/ml/gdb-patches/2014-09/msg00717.html
gdb/Changelog:
* inferior.c (delete_inferior_1): Rename to ...
(delete_inferior): ..., remove 'silent' parameter, delete
program space when unused and remove call to prune_program_spaces.
Remove the old, unused, delete_inferior.
(delete_inferior_silent): Remove.
(prune_inferiors): Change call from delete_inferior_1 to
delete_inferior and remove 'silent' parameter. Remove call to
prune_program_spaces.
(remove_inferior_command): Idem.
* inferior.h (delete_inferior_1): Rename to...
(delete_inferior): ..., remove 'silent' parameter and remove the
original delete_inferior.
(delete_inferior_silent): Remove.
* mi/mi-main.c (mi_cmd_remove_inferior): Change call from
delete_inferior_1 to delete_inferior and remove 'silent'
parameter.
* progspace.c (prune_program_spaces): Remove.
(pspace_empty_p): Rename to...
(program_space_empty_p): ... and make non-static.
(delete_program_space): New.
* progspace.h (prune_program_spaces): Remove declaration.
(program_space_empty_p): New declaration.
(delete_program_space): New declaration.
With dummy_frame destructors GDB no longer has to use global stop_registers.
dummy_frame's registers can be now stored associated with their specific
dummy_frame.
gdb/ChangeLog
2015-05-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* infcall.c (struct dummy_frame_context_saver)
(dummy_frame_context_saver_data_free, dummy_frame_context_saver_dtor)
(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
New.
(call_function_by_hand_dummy): Move discard_cleanups of
inf_status_cleanup before dummy_frame_push. Call
dummy_frame_context_saver_setup and prepare context_saver_cleanup.
Use dummy_frame_context_saver_get_regs instead of stop_registers.
* infcall.h (struct dummy_frame_context_saver)
(dummy_frame_context_saver_drop, dummy_frame_context_saver_cleanup)
(dummy_frame_context_saver_get_regs, dummy_frame_context_saver_setup):
New declarations.
* infcmd.c: Include infcall.h.
(get_return_value): Add parameter ctx_saver, use it instead of
stop_registers.
(print_return_value): Add parameter ctx_saver, pass it.
(struct finish_command_continuation_args): Add field ctx_saver.
(finish_command_continuation): Update print_return_value caller.
(finish_command_continuation_free_arg): Free also ctx_saver.
(finish_forward): Call dummy_frame_context_saver_setup.
* inferior.h (struct dummy_frame_context_saver): New declaration.
(get_return_value): Add parameter ctx_saver.
* python/py-finishbreakpoint.c (bpfinishpy_pre_stop_hook): Update
get_return_value caller.
This patch renames symbols that happen to have names which are
reserved keywords in C++.
Most of this was generated with Tromey's cxx-conversion.el script.
Some places where later hand massaged a bit, to fix formatting, etc.
And this was rebased several times meanwhile, along with re-running
the script, so re-running the script from scratch probably does not
result in the exact same output. I don't think that matters anyway.
gdb/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
gdb/gdbserver/
2015-02-27 Tom Tromey <tromey@redhat.com>
Pedro Alves <palves@redhat.com>
Rename symbols whose names are reserved C++ keywords throughout.
This patch is to change print_float_info gdbarch method for the
following two reasons,
1. we want to add a default implementation of print_float_info to
dump the float pointer registers. It can be reused by backend to
print something more than float point registers.
2. we want to simplify the caller of print_float_info,
infcmd.c:print_float_info.
gdb:
2014-12-18 Yao Qi <yao@codesourcery.com>
* gdbarch.sh (print_float_info): Change its type from 'M' to 'm'.
* gdbarch.c: Re-generated.
* gdbarch.h: Likewise.
* infcmd.c (default_print_float_info): New function.
(print_float_info): Removed. Move code to
default_print_float_info.
(float_info): Adjust to call gdbarch_print_float_info.
* inferior.h (default_print_float_info): Declare it.
This patch introduces find_inferior_ptid to replace the common idiom
find_inferior_pid (ptid_get_pid (...));
It replaces all the instances of that idiom that I found with the new
function.
No significant changes before/after the patch in the regression suite
on amd64 linux.
gdb/ChangeLog:
* inferior.c (find_inferior_ptid): New function.
* inferior.h (find_inferior_ptid): New declaration.
* ada-tasks.c (ada_get_task_number): Use find_inferior_ptid.
* corelow.c (core_pid_to_str): Same.
* darwin-nat.c (darwin_resume): Same.
* infrun.c (fetch_inferior_event): Same.
(get_inferior_stop_soon): Same.
(handle_inferior_event): Same.
(handle_signal_stop): Same.
* linux-nat.c (resume_lwp): Same.
(stop_wait_callback): Same.
* mi/mi-interp.c (mi_new_thread): Same.
(mi_thread_exit): Same.
* proc-service.c (ps_pglobal_lookup): Same.
* record-btrace.c (record_btrace_step_thread): Same.
* remote-sim.c (gdbsim_close_inferior): Same.
(gdbsim_resume): Same.
(gdbsim_stop): Same.
* sol2-tdep.c (sol2_core_pid_to_str): Same.
* target.c (memory_xfer_partial_1): Same.
(default_thread_address_space): Same.
* thread.c (thread_change_ptid): Same.
(switch_to_thread): Same.
(do_restore_current_thread_cleanup): Same.
This commit does most of the mechanical removal. IOW, the easy part.
procfs.c isn't touched beyond removing a couple obvious bits that are
guarded by a couple macros defined in config/alpha/nm-osf3.h. Going
beyond that for procfs.c & co would be a harder excision that
potentially affects Solaris.
Some comments in the generic alpha code ABIs that may still be
relevant and I wouldn't know what to do with them. That can always be
done on a separate pass, preferably by someone who can test on alpha.
A couple other spots have references to OSF/Tru64 and related files
being removed, but it felt like removing them would make things worse,
not better. We can revisit those when we next need to touch that
code.
I didn't remove a reference to osf in testsuite/lib/future.exp, as I
believe that code is imported from DejaGNU.
Built and tested on x86_64 Fedora 20, with --enable-targets=all.
Tested that building for --target=alpha-osf3 on x86_64 Fedora 20
fails with:
checking for default auto-load directory... $debugdir:$datadir/auto-load
checking for default auto-load safe-path... $debugdir:$datadir/auto-load
*** Configuration alpha-unknown-osf3 is obsolete.
*** Support has been REMOVED.
make[1]: *** [configure-gdb] Error 1
make[1]: Leaving directory `build-osf'
make: *** [all] Error 2
gdb/
2014-10-17 Pedro Alves <palves@redhat.com>
* Makefile.in (ALL_64_TARGET_OBS): Remove alpha-osf1-tdep.o.
(HFILES_NO_SRCDIR): Remove config/alpha/nm-osf3.h.
(ALLDEPFILES): Remove alpha-nat.c, alpha-osf1-tdep.c and
solib-osf.c.
* NEWS: Mention that support for alpha*-*-osf* has been removed.
* ada-lang.h [__alpha__ && __osf__]
(ADA_KNOWN_RUNTIME_FILE_NAME_PATTERNS): Delete.
* alpha-nat.c, alpha-osf1-tdep.c: Delete files.
* alpha-tdep.c (alpha_gdbarch_init): Remove reference to
GDB_OSABI_OSF1.
* config/alpha/alpha-osf3.mh, config/alpha/nm-osf3.h: Delete
files.
* config/djgpp/fnchange.lst (config/alpha/alpha-osf1.mh)
(config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh): Delete.
* configure: Regenerate.
* configure.ac: Remove references to osf.
* configure.host: Handle alpha*-*-osf* in the obsolete hosts
section. Remove all other references to osf.
* configure.tgt: Add alpha*-*-osf* to the obsolete targets section.
Remove all other references to osf.
* dec-thread.c: Delete file.
* defs.h (GDB_OSABI_OSF1): Delete.
* inferior.h (START_INFERIOR_TRAPS_EXPECTED): New unconditionally
defined.
* osabi.c (gdb_osabi_names): Delete "OSF/1".
* procfs.c (procfs_debug_inferior) [PROCFS_DONT_TRACE_FAULTS]:
Delete code.
(unconditionally_kill_inferior)
[PROCFS_NEED_CLEAR_CURSIG_FOR_KILL]: Delete code.
* solib-osf.c: Delete file.
gdb/testsuite/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.base/callfuncs.exp: emove references to osf.
* gdb.base/sigall.exp: Likewise.
* gdb.gdb/selftest.exp: Likewise.
* gdb.hp/gdb.base-hp/callfwmall.exp: Likewise.
* gdb.mi/non-stop.c: Likewise.
* gdb.mi/pthreads.c: Likewise.
* gdb.reverse/sigall-precsave.exp: Likewise.
* gdb.reverse/sigall-reverse.exp: Likewise.
* gdb.threads/pthreads.c: Likewise.
* gdb.threads/pthreads.exp: Likewise.
gdb/doc/
2014-10-17 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Ada Tasks and Core Files): Delete mention of Tru64.
(SVR4 Process Information): Delete mention of OSF/1.
A patch I wrote made GDB pull the thread list sooner when debugging
with target remote, and I noticed an intended consequence. GDB
started bouncing around the currently selected remote/general thread
more frequently. E.g.:
Sending packet: $qTMinFTPILen#3b...Packet received: 5
+Sending packet: $Hgp726d.726d#53...Packet received: OK
Sending packet: $m400680,40#2f...Packet received: 85c0741455bff00d60004889e5ffd05de97bffffff0f1f00e973ffffff0f1f00554889e5c745fc00000000c745fc01000000e900000000c745fc02000000b800
+Sending packet: $Hgp726d.7278#28...Packet received: OK
Sending packet: $m4006b2,1#28...Packet received: e9
Fast tracepoint 2 at 0x4006b2: file gdb/testsuite/gdb.trace/range-stepping.c, line 53.
Sending packet: $qTStatus#49...Packet received: T0;tnotrun:0;tframes:0;tcreated:0;tfree:500000;tsize:500000;circular:0;disconn:0;starttime:0;stoptime:0;username:;notes::
This ended up breaking "tstart" when one has fast tracepoints set,
because gdbserver isn't expecting an Hg packet in response to
qRelocInsn:
(gdb) ftrace *set_point
Fast tracepoint 3 at 0x4006b2: file gdb/testsuite/gdb.trace/range-stepping.c, line 53.
(gdb) PASS: gdb.trace/range-stepping.exp: ftrace: ftrace *set_point
tstart
gdbserver: Malformed response to qRelocInsn, ignoring: Hgp2783.2783
Target does not support this command.
(gdb) FAIL: gdb.trace/range-stepping.exp: ftrace: tstart
remote_trace_start should probably start by making sure the remote
current thread matches inferior_ptid (calling set_general_thread), but
still, reducing unnecessary bouncing is a good idea. It happens
because the memory/symbol/breakpoint routines use
switch_to_program_space_and_thread to do something in the right
context and then revert back to the previously current thread.
The fix is to simply make any_thread_of_process,
find_inferior_for_program_space, etc. give preference to the current
thread/inferior it if matches.
gdb/
2014-10-02 Pedro Alves <palves@redhat.com>
* gdbthread.h (any_thread_of_process, any_live_thread_of_process):
Adjust comments.
* inferior.c (find_inferior_for_program_space): Give preference to
the current inferior.
* inferior.h (find_inferior_for_program_space): Update comment.
* progspace.c (switch_to_program_space_and_thread): Prefer the
current inferior if it's bound to the program space requested. If
the inferior found doesn't have a PID yet, don't bother looking up
a thread.
* progspace.h (switch_to_program_space_and_thread): Adjust
comment.
* thread.c (any_thread_of_process, any_live_thread_of_process):
Give preference to the current thread.
The TUI terminal state becomes corrupted (e.g. key sequences such as
Alt_F and Alt_B no longer work) when one attaches to an inferior process
(via "run" or "attach") from within TUI. This terminal corruption
remains until you switch out of TUI mode.
This happens because the terminal state is not properly saved when
switching to and out from TUI mode. Although the functions tui_enable()
and tui_disable() both call the function target_terminal_save_ours() to
save the terminal state, this function is a no-op unless GDB has already
attached to an inferior process. This is because only the "native"
target has a useful implementation of target_terminal_save_ours()
(namely child_terminal_save_ours()) and we only have the "native" target
in our target vector if GDB has already attached to an inferior process.
So without an inferior process, switching to and from TUI mode does not
actually save the terminal state. Therefore when you attach to an
inferior process from within TUI mode, the proper terminal state is not
restored (after swapping from the inferior's terminal back to the GDB
terminal).
To fix this we just have to ensure that the terminal state is always
being properly saved when switching from and to TUI mode. To achieve
this, this patch removes the polymorphic function
target_terminal_save_ours() and replaces it with a regular function
gdb_save_tty_state() that always saves the terminal state.
Tested on x86_64-unknown-linux-gnu by running "make check", no new
regressions.
gdb/ChangeLog:
* target.h (struct target_ops::to_terminal_save_ours): Remove
declaration.
(target_terminal_save_ours): Remove macro.
* target-delegates.c: Regenerate.
* inf-child.c (inf_child_target): Don't set the nonexistent
field to_terminal_save_ours.
* inferior.h (child_terminal_save_ours): Remove declaration.
* terminal.h (gdb_save_tty_state): New declaration.
* inflow.c (child_terminal_save_ours): Rename to ...
(gdb_save_tty_state): ... this.
* tui/tui.c: Include terminal.h.
(tui_enable): Use gdb_save_tty_state instead of
target_terminal_save_ours.
(tui_disable): Likewise.
This commit moves the inclusion of ptid.h to common-defs.h and removes
all other inclusions.
gdb/
2014-08-07 Gary Benson <gbenson@redhat.com>
* common/common-defs.h: Include ptid.h.
* defs.h: Do not include ptid.h.
* inferior.h: Likewise.
* infrun.h: Likewise.
* nat/linux-btrace.h: Likewise.
* nat/linux-osdata.h: Likewise.
* target/waitstatus.h: Likewise.
gdb/gdbserver/
2014-08-07 Gary Benson <gbenson@redhat.com>
* server.h: Do not include ptid.h.
* notif.h: Likewise.
This finally makes background execution commands possible by default.
However, in order to do that, there's one last thing we need to do --
we need to separate the MI and target notions of "async". Unlike the
CLI, where the user explicitly requests foreground vs background
execution in the execution command itself (c vs c&), MI chose to treat
"set target-async" specially -- setting it changes the default
behavior of execution commands.
So, we can't simply "set target-async" default to on, as that would
affect MI frontends. Instead we have to make the setting MI-specific,
and teach MI about sync commands on top of an async target.
Because the "target" word in "set target-async" ends up as a potential
source of confusion, the patch adds a "set mi-async" option, and makes
"set target-async" a deprecated alias.
Rather than make the targets always async, this patch introduces a new
"maint set target-async" option so that the GDB developer can control
whether the target is async. This makes it simpler to debug issues
arising only in the synchronous mode; important because sync mode
seems unlikely to go away.
Unlike in previous revisions, "set target-async" does not affect this
new maint parameter. The rationale for this is that then one can
easily run the test suite in the "maint set target-async off" mode and
have tests that enable mi-async fail just like they fail on
non-async-capable targets. This emulation is exactly the point of the
maint option.
I had asked Tom in a previous iteration to split the actual change of
the target async default to a separate patch, but it turns out that
that is quite awkward in this version of the patch, because with MI
async and target async decoupled (unlike in previous versions), if we
don't flip the default at the same time, then just "set target-async
on" alone never actually manages to do anything. It's best to not
have that transitory state in the tree.
Given "set target-async on" now only has effect for MI, the patch goes
through the testsuite removing it from non-MI tests. MI tests are
adjusted to use the new and less confusing "mi-async" spelling.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* NEWS: Mention "maint set target-async", "set mi-async", and that
background execution commands are now always available.
* target.h (target_async_permitted): Update comment.
* target.c (target_async_permitted, target_async_permitted_1):
Default to 1.
(set_target_async_command): Rename to ...
(maint_set_target_async_command): ... this.
(show_target_async_command): Rename to ...
(maint_show_target_async_command): ... this.
(_initialize_target): Adjust.
* infcmd.c (prepare_execution_command): Make extern.
* inferior.h (prepare_execution_command): Declare.
* infrun.c (set_observer_mode): Leave target async alone.
* mi/mi-interp.c (mi_interpreter_init): Install
mi_on_sync_execution_done as sync_execution_done observer.
(mi_on_sync_execution_done): New function.
(mi_execute_command_input_handler): Don't print the prompt if we
just started a synchronous command with an async target.
(mi_on_resume): Check sync_execution before printing prompt.
* mi/mi-main.h (mi_async_p): Declare.
* mi/mi-main.c: Include gdbcmd.h.
(mi_async_p): New function.
(mi_async, mi_async_1): New globals.
(set_mi_async_command, show_mi_async_command, mi_async): New
functions.
(exec_continue): Call prepare_execution_command.
(run_one_inferior, mi_cmd_exec_run, mi_cmd_list_target_features)
(mi_execute_async_cli_command): Use mi_async_p.
(_initialize_mi_main): Install "set mi-async". Make
"target-async" a deprecated alias.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Non-Stop Mode): Remove "set target-async 1"
from example.
(Asynchronous and non-stop modes): Document '-gdb-set mi-async'.
Mention that target-async is now deprecated.
(Maintenance Commands): Document maint set/show target-async.
2014-05-29 Pedro Alves <palves@redhat.com>
Tom Tromey <tromey@redhat.com>
* gdb.base/async-shell.exp: Don't enable target-async.
* gdb.base/async.exp
* gdb.base/corefile.exp (corefile_test_attach): Remove 'async'
parameter. Adjust.
(top level): Don't test with "target-async".
* gdb.base/dprintf-non-stop.exp: Don't enable target-async.
* gdb.base/gdb-sigterm.exp: Don't test with "target-async".
* gdb.base/inferior-died.exp: Don't enable target-async.
* gdb.base/interrupt-noterm.exp: Likewise.
* gdb.mi/mi-async.exp: Use "mi-async" instead of "target-async".
* gdb.mi/mi-nonstop-exit.exp: Likewise.
* gdb.mi/mi-nonstop.exp: Likewise.
* gdb.mi/mi-ns-stale-regcache.exp: Likewise.
* gdb.mi/mi-nsintrall.exp: Likewise.
* gdb.mi/mi-nsmoribund.exp: Likewise.
* gdb.mi/mi-nsthrexec.exp: Likewise.
* gdb.mi/mi-watch-nonstop.exp: Likewise.
* gdb.multi/watchpoint-multi.exp: Adjust comment.
* gdb.python/py-evsignal.exp: Don't enable target-async.
* gdb.python/py-evthreads.exp: Likewise.
* gdb.python/py-prompt.exp: Likewise.
* gdb.reverse/break-precsave.exp: Don't test with "target-async".
* gdb.server/solib-list.exp: Don't enable target-async.
* gdb.threads/thread-specific-bp.exp: Likewise.
* lib/mi-support.exp: Adjust to use mi-async.
Move infrun.c declarations out of inferior.h to a new infrun.h file.
Tested by building on:
i686-w64-mingw32, enable-targets=all
x86_64-linux, enable-targets=all
i586-pc-msdosdjgpp
And also grepped the whole tree for each symbol moved to find where
infrun.h might be necessary.
gdb/
2014-05-22 Pedro Alves <palves@redhat.com>
* inferior.h (debug_infrun, debug_displaced, stop_on_solib_events)
(sync_execution, sched_multi, step_stop_if_no_debug, non_stop)
(disable_randomization, enum exec_direction_kind)
(execution_direction, stop_registers, start_remote)
(clear_proceed_status, proceed, resume, user_visible_resume_ptid)
(wait_for_inferior, normal_stop, get_last_target_status)
(prepare_for_detach, fetch_inferior_event, init_wait_for_inferior)
(insert_step_resume_breakpoint_at_sal)
(follow_inferior_reset_breakpoints, stepping_past_instruction_at)
(set_step_info, print_stop_event, signal_stop_state)
(signal_print_state, signal_pass_state, signal_stop_update)
(signal_print_update, signal_pass_update)
(update_signals_program_target, clear_exit_convenience_vars)
(displaced_step_dump_bytes, update_observer_mode)
(signal_catch_update, gdb_signal_from_command): Move
declarations ...
* infrun.h: ... to this new file.
* amd64-tdep.c: Include infrun.h.
* annotate.c: Include infrun.h.
* arch-utils.c: Include infrun.h.
* arm-linux-tdep.c: Include infrun.h.
* arm-tdep.c: Include infrun.h.
* break-catch-sig.c: Include infrun.h.
* breakpoint.c: Include infrun.h.
* common/agent.c: Include infrun.h instead of inferior.h.
* corelow.c: Include infrun.h.
* event-top.c: Include infrun.h.
* go32-nat.c: Include infrun.h.
* i386-tdep.c: Include infrun.h.
* inf-loop.c: Include infrun.h.
* infcall.c: Include infrun.h.
* infcmd.c: Include infrun.h.
* infrun.c: Include infrun.h.
* linux-fork.c: Include infrun.h.
* linux-nat.c: Include infrun.h.
* linux-thread-db.c: Include infrun.h.
* monitor.c: Include infrun.h.
* nto-tdep.c: Include infrun.h.
* procfs.c: Include infrun.h.
* record-btrace.c: Include infrun.h.
* record-full.c: Include infrun.h.
* remote-m32r-sdi.c: Include infrun.h.
* remote-mips.c: Include infrun.h.
* remote-notif.c: Include infrun.h.
* remote-sim.c: Include infrun.h.
* remote.c: Include infrun.h.
* reverse.c: Include infrun.h.
* rs6000-tdep.c: Include infrun.h.
* s390-linux-tdep.c: Include infrun.h.
* solib-irix.c: Include infrun.h.
* solib-osf.c: Include infrun.h.
* solib-svr4.c: Include infrun.h.
* target.c: Include infrun.h.
* top.c: Include infrun.h.
* windows-nat.c: Include infrun.h.
* mi/mi-interp.c: Include infrun.h.
* mi/mi-main.c: Include infrun.h.
* python/py-threadevent.c: Include infrun.h.
Say the program is stopped at a breakpoint, and the user sets a
watchpoint. When the program is next resumed, GDB will first step
over the breakpoint, as explained in the manual:
@value {GDBN} normally ignores breakpoints when it resumes
execution, until at least one instruction has been executed. If it
it did not do this, you would be unable to proceed past a breakpoint
without first disabling the breakpoint. This rule applies whether
or not the breakpoint already existed when your program stopped.
However, GDB currently also removes watchpoints, catchpoints, etc.,
and that means that the first instruction off the breakpoint does not
trigger the watchpoint, catchpoint, etc.
testsuite/gdb.base/watchpoint.exp has a kfail for this.
The PR proposes installing watchpoints only when stepping over a
breakpoint, but that misses catchpoints, etc.
A better fix would instead work from the opposite direction -- remove
only real breakpoints, leaving all other kinds of breakpoints
inserted.
But, going further, it's really a waste to constantly remove/insert
all breakpoints when stepping over a single breakpoint (generating a
pair of RSP z/Z packets for each breakpoint), so the fix goes a step
further and makes GDB remove _only_ the breakpoint being stepped over,
leaving all others installed. This then has the added benefit of
reducing breakpoint-related RSP traffic substancialy when there are
many breakpoints set.
gdb/
2014-03-20 Pedro Alves <palves@redhat.com>
PR breakpoints/7143
* breakpoint.c (should_be_inserted): Don't insert breakpoints that
are being stepped over.
(breakpoint_address_match): Make extern.
* breakpoint.h (breakpoint_address_match): New declaration.
* inferior.h (stepping_past_instruction_at): New declaration.
* infrun.c (struct step_over_info): New type.
(step_over_info): New global.
(set_step_over_info, clear_step_over_info)
(stepping_past_instruction_at): New functions.
(handle_inferior_event): Clear the step-over info when
trap_expected is cleared.
(resume): Remove now stale comment.
(clear_proceed_status): Clear step-over info.
(proceed): Adjust step-over handling to set or clear the step-over
info instead of removing all breakpoints.
(handle_signal_stop): When setting up a thread-hop, don't remove
breakpoints here.
(stop_stepping): Clear step-over info.
(keep_going): Adjust step-over handling to set or clear step-over
info and then always inserting breakpoints, instead of removing
all breakpoints when stepping over one.
gdb/testsuite/
2014-03-20 Pedro Alves <palves@redhat.com>
PR breakpoints/7143
* gdb.base/watchpoint.exp: Mention bugzilla bug number instead of
old gnats gdb/38. Remove kfail. Adjust to use gdb_test instead
of gdb_test_multiple.
* gdb.cp/annota2.exp: Remove kfail for gdb/38.
* gdb.cp/annota3.exp: Remove kfail for gdb/38.
Part of PR gdb/13860 is about the mi-solib.exp test's output being
different in sync vs async modes.
sync:
>./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async off" -i=mi
=thread-group-added,id="i1"
~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..."
~"done.\n"
(gdb)
&"start\n"
~"Temporary breakpoint 1 at 0x400608: file ../../../src/gdb/testsuite/gdb.mi/solib-main.c, line 21.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400608",func="main",file="../../../src/gdb/testsuite/gdb.mi/solib-main.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/solib-main.c",line="21",times="0",original-location="main"}
~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n"
=thread-group-started,id="i1",pid="17724"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
~"Stopped due to shared library event (no libraries added or removed)\n"
*stopped,reason="solib-event",frame={addr="0x000000379180f990",func="_dl_debug_state",args=[],from="/lib64/ld-linux-x86-64.so.2"},thread-id="1",stopped-threads="all",core="3"
(gdb)
async:
>./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async on" -i=mi
=thread-group-added,id="i1"
~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..."
~"done.\n"
(gdb)
start
&"start\n"
~"Temporary breakpoint 1 at 0x400608: file ../../../src/gdb/testsuite/gdb.mi/solib-main.c, line 21.\n"
=breakpoint-created,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0000000000400608",func="main",file="../../../src/gdb/testsuite/gdb.mi/solib-main.c",fullname="/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.mi/solib-main.c",line="21",times="0",original-location="main"}
~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n"
=thread-group-started,id="i1",pid="17729"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
(gdb)
*stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="1"
For now, let's focus only on the *stopped event. We see that the
async output is missing frame info. And this causes a test failure in
async mode, as "mi_expect_stop solib-event" wants to see the frame
info.
However, if we compare the event output when a real MI execution
command is used, compared to a CLI command (e.g., run vs -exec-run,
next vs -exec-next, etc.), we see:
>./gdb -nx -q ./testsuite/gdb.mi/solib-main -ex "set stop-on-solib-events 1" -ex "set target-async off" -i=mi
=thread-group-added,id="i1"
~"Reading symbols from /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main..."
~"done.\n"
(gdb)
r
&"r\n"
~"Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.mi/solib-main \n"
=thread-group-started,id="i1",pid="17751"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
~"Stopped due to shared library event (no libraries added or removed)\n"
*stopped,reason="solib-event",frame={addr="0x000000379180f990",func="_dl_debug_state",args=[],from="/lib64/ld-linux-x86-64.so.2"},thread-id="1",stopped-threads="all",core="3"
(gdb)
-exec-run
=thread-exited,id="1",group-id="i1"
=thread-group-exited,id="i1"
=library-unloaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",thread-group="i1"
=thread-group-started,id="i1",pid="17754"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb)
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
*stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="1"
=thread-selected,id="1"
(gdb)
As seen above, with MI commands, the *stopped event _doesn't_ have
frame info. This is because normal_stop, as commanded by the result
of bpstat_print, skips printing frame info in this case (it's an
"event", not a "breakpoint"), and when the interpreter is MI,
mi_on_normal_stop skips calling print_stack_frame, as the normal_stop
call was already done with the MI uiout. This explains why the async
output is different even with a CLI command. Its because in async
mode, the mi_on_normal_stop path is always taken; it is always reached
with the MI uiout, because the stop is handled from the event loop,
instead of from within `proceed -> wait_for_inferior -> normal_stop'
with the interpreter overridden, as in sync mode.
This patch fixes the issue by making all cases output the same
*stopped event, by factoring out the print code from normal_stop, and
using it from mi_on_normal_stop as well. I chose the *stopped output
without a frame, mainly because that is what you already get if you
use MI execution commands, the commands frontends are supposed to use
(except when implementing a console). This patch makes it simpler to
tweak the MI output differently if desired, as we only have to change
the centralized print_stop_event (taking into account whether the
uiout is MI-like), and all different modes will change accordingly.
Tested on x86_64 Fedora 17, no regressions. The mi-solib.exp test no
longer fails in async mode with this patch, so the patch removes the
kfail.
2014-03-18 Pedro Alves <palves@redhat.com>
PR gdb/13860
* inferior.h (print_stop_event): Declare.
* infrun.c (print_stop_event): New, factored out from ...
(normal_stop): ... this.
* mi/mi-interp.c (mi_on_normal_stop): Use print_stop_event instead
of bpstat_print/print_stack_frame.
2014-03-18 Pedro Alves <palves@redhat.com>
PR gdb/13860
* gdb.mi/mi-solib.exp: Remove gdb/13860 kfail.
* lib/mi-support.exp (mi_expect_stop): Add special handling for
solib-event.
Looking at target_terminal_inferior etc. in async mode, I realized
that the naming of the terminal_inferior, terminal_ours,
etc. functions doesn't really give a clue that they're meant for the
native target only. This patch renames them. There's already
child_terminal_info using the child_ prefix, and, they're most
prominently installed by inf-child.c, so I went with the child_
prefix. I dropped "inferior" from a couple to make the name match the
corresponding target method.
Tested on x86_64 Fedora 17, and cross built for mingw. I didn't test
gnu-nat.c, but I think the change is as obvious as it gets. I grepped
the tree looking for other potential spots that would need adjustment
but this is all I found. If something breaks, it should be trivial to
fix.
gdb/
2014-03-14 Pedro Alves <palves@redhat.com>
* inferior.h (terminal_ours_for_output): Rename to ...
(child_terminal_ours_for_output): ... this.
(terminal_save_ours): Rename to ...
(child_terminal_save_ours): ... this.
(terminal_ours): Rename to ...
(child_terminal_ours): ... this.
(terminal_inferior): Rename to ...
(child_terminal_inferior): ... this.
(terminal_init_inferior): Rename to ...
(child_terminal_init_inferior): ... this.
(terminal_init_inferior_with_pgrp): Rename to ...
(child_terminal_init_inferior_with_pgrp): ... this.
* inflow.c (terminal_init_inferior_with_pgrp): Rename to ...
(child_terminal_init_with_pgrp): ... this.
(terminal_save_ours): Rename to ...
(child_terminal_save_ours): ... this.
(terminal_init_inferior): Rename to ...
(child_terminal_init): ... this. Adjust.
(terminal_inferior): Rename to ...
(child_terminal_inferior): ... this.
(terminal_ours_for_output): Rename to ...
(child_terminal_ours_for_output): ... this. Adjust.
(terminal_ours): Rename to ...
(child_terminal_ours): ... this.
(terminal_ours_1): Rename to ...
(child_terminal_ours_1): ... this. Adjust.
* linux-nat.c (linux_nat_terminal_inferior): Adjust.
* windows-nat.c (do_initial_windows_stuff): Adjust.
* gnu-nat.c (gnu_terminal_init_inferior): Rename to ...
(gnu_terminal_init): ... this. Adjust.
(gnu_target): Adjust.
* inf-child.c (inf_child_target): Adjust.
Occasionaly we hear about people having problems with GDB not being
able to start programs (with "run"/"start"). GDB spawns a shell to
start the program, and most often, it'll be the case that the problem
is actually with the user's shell setup.
GDB has code to disable the use of the shell to start programs.
That's the STARTUP_WITH_SHELL macro that native targets could set to 0
in their nm.h file (though no target actually uses it nowadays).
This patch makes that setting a run-time knob instead. This will be
useful to quickly diagnose such shell issues, and might also come in
handy at other times (such as when debugging the shell itself, if you
don't have a different shell handy).
gdb/
2013-10-24 Pedro Alves <palves@redhat.com>
* NEWS (New options): Mention set/show startup-with-shell.
* config/alpha/nm-osf3.h (START_INFERIOR_TRAPS_EXPECTED): Set to 2
instead of 3.
* fork-child.c (fork_inferior, startup_inferior): Handle 'set
startup-with-shell'.
(show_startup_with_shell): New function.
(_initialize_fork_child): Register the set/show startup-with-shell
commands.
* inf-ptrace.c (inf_ptrace_create_inferior): Remove comment.
* inf-ttrace.c (inf_ttrace_him): Remove comment.
* procfs.c (procfs_init_inferior): Remove comment.
* infcmd.c (startup_with_shell): New global.
* inferior.h (startup_with_shell): Declare global.
(STARTUP_WITH_SHELL): Delete.
(START_INFERIOR_TRAPS_EXPECTED): Set to 1 by default instead of 2.
gdb/doc/
2013-10-24 Pedro Alves <palves@redhat.com>
* gdb.texinfo (Starting): Document set/show startup-with-shell.
will hold the signal number when the inferior terminates due to the
uncaught signal.
I've made modifications on infrun.c:handle_inferior_event such that
$_exitcode gets cleared when the inferior signalled, and vice-versa.
This assumption was made because the variables are mutually
exclusive, i.e., when the inferior terminates because of an uncaught
signal it is not possible for it to return. I have also made modifications
such that when a corefile is loaded, $_exitsignal gets set to the uncaught
signal that "killed" the inferior, and $_exitcode is cleared.
The patch also adds a NEWS entry, documentation bits, and a testcase. The
documentation entry explains how to use $_exitsignal and $_exitcode in a
GDB script, by making use of the new $_isvoid convenience function.
gdb/
2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
* NEWS: Mention new convenience variable $_exitsignal.
* corelow.c (core_open): Reset exit convenience variables. Set
$_exitsignal to the uncaught signal which generated the corefile.
* infrun.c (handle_inferior_event): Reset exit convenience
variables. Set $_exitsignal for TARGET_WAITKIND_SIGNALLED.
(clear_exit_convenience_vars): New function.
* inferior.h (clear_exit_convenience_vars): New prototype.
gdb/testsuite/
2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.base/corefile.exp: Test whether $_exitsignal is set and
$_exitcode is void when opening a corefile.
* gdb.base/exitsignal.exp: New file.
* gdb.base/segv.c: Likewise.
* gdb.base/normal.c: Likewise.
gdb/doc/
2013-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb.texinfo (Convenience Variables): Document $_exitsignal.
Update entry for $_exitcode.
detach_fork.
* inf-ptrace.c (inf_ptrace_follow_fork): Likewise.
* inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
* inferior.h (detach_fork): Remove.
* infrun.c (detach_fork): Adjust comment and make it
static.
(follow_fork): Pass detach_fork parameter to
target_follow_fork.
* linux-nat.c (linux_child_follow_fork): New parameter
detach_fork.
* target.c (target_follow_fork): New parameter detach_fork.
Pass detach_fork as parameter and print its value.
* target.h (struct target_ops) <to_follow_fork>: New int
parameter.
(target_follow_fork): New parameter detach_fork.
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.
2012-11-30 Yao Qi <yao@codesourcery.com>
* infrun.c (error_is_running, ensure_not_running): Move them
to ...
* infcmd.c (error_is_running, ensure_not_running): ... here.
Make them 'static'.
* inferior.h: Remove declarations of error_is_running and
ensure_not_running.
2012-11-09 Pedro Alves <palves@redhat.com>
* gdbarch.sh (target_gdbarch) <gdbarch.h>: Reimplement as macro.
(get_target_gdbarch) <gdbarch.h>: New function.
(startup_gdbarch) <gdbarch.h>: Declare.
<gdbarch.c> (target_gdbarch): Delete.
<gdbarch.c> (deprecated_target_gdbarch_select_hack): Set the
current inferior's gdbarch.
<gdbarch.c> (get_target_gdbarch): New function.
* inferior.c: Include target-descriptions.h.
(free_inferior): Free target description info.
(add_inferior_with_spaces): Set the inferior's initial
architecture.
(clone_inferior_command): Copy the original inferior's target
description if it was user specified.
(initialize_inferiors): Add comment.
* inferior.h (struct target_desc_info): Forward declare.
(struct inferior) <gdbarch>: New field.
* linux-nat.c: Include target-descriptions.h.
(linux_child_follow_fork): Copy the parent's architecture and
target description to the child.
* target-descriptions.c: Include inferior.h.
(struct target_desc_info): New structure, holding the equivalents
of ...
(target_desc_fetched, current_target_desc)
(target_description_filename): ... these removed globals.
(get_tdesc_info, target_desc_info_from_user_p)
(copy_inferior_target_desc_info, target_desc_info_free): New.
(target_desc_fetched, current_target_desc)
(target_description_filename): Reimplemented as convenience
macros.
(tdesc_filename_cmd_string): New global.
(set_tdesc_filename_cmd): Copy the string manipulated by the "set
tdescs filename ..." commands to the per-inferior equivalent.
(show_tdesc_filename_cmd): Get the value to show from the
per-inferior description filename.
(_initilize_target_descriptions): Change the "set/show tdesc
filename" commands' variable.
* target-descriptions.h (struct target_desc, struct target_desc_info)
(struct inferior): Forward declare.
(target_find_description, target_clear_description)
(target_current_description): Adjust comments.
(copy_inferior_target_desc_info, target_desc_info_free)
(target_desc_info_from_user_p). Declare.
gdb/testsuite/
2012-11-09 Pedro Alves <palves@redhat.com>
* gdb.multi/multi-arch.exp: New.
PR build/14003
* inferior.h (struct inferior_suspend_state): Comment out.
(struct inferior): Comment out the field suspend.
* infrun.c (struct infcall_suspend_state): Comment out the field
inferior_suspend.
(save_infcall_suspend_state, restore_infcall_suspend_state): Comment
out its assignment.
* breakpoint.h (bp_location): Add related_address member.
* inferior.h (get_return_value): Take a pointer to struct value
instead of struct type for the function requested.
* value.h (using_struct_return): Likewise.
* gdbarch.sh (return_value): Take a pointer to struct value
instead of struct type for the function requested.
* breakpoint.c (set_breakpoint_location_function): Initialize
related_address for bp_gnu_ifunc_resolver breakpoints.
* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the
requested function's address to gdbarch_return_value.
* eval.c (evaluate_subexp_standard): Pass the requested
function's address to using_struct_return.
* infcall.c (call_function_by_hand): Pass the requested
function's address to using_struct_return and
gdbarch_return_value.
* infcmd.c (get_return_value): Take a pointer to struct value
instead of struct type for the function requested.
(print_return_value): Update accordingly.
(finish_command_continuation): Likewise.
* stack.c (return_command): Pass the requested function's
address to using_struct_return and gdbarch_return_value.
* value.c (using_struct_return): Take a pointer to struct value
instead of struct type for the function requested. Pass the
requested function's address to gdbarch_return_value.
* python/py-finishbreakpoint.c (finish_breakpoint_object):
New function_value member, replacing function_type.
(bpfinishpy_dealloc): Update accordingly.
(bpfinishpy_pre_stop_hook): Likewise.
(bpfinishpy_init): Likewise. Record the requested function's
address.
* mips-tdep.c (mips_fval_reg): New enum.
(mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap
words put in GP registers.
(mips_o64_push_dummy_call): Update a comment.
(mips_o32_return_value): Take a pointer to struct value instead
of struct type for the function requested and use it to check if
using the MIPS16 calling convention. Return the designated
general purpose registers for floating-point values returned in
MIPS16 mode.
(mips_o64_return_value): Likewise.
* ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_return_value): Likewise.
* alpha-tdep.c (alpha_return_value): Take a pointer to struct
value instead of struct type for the function requested.
* amd64-tdep.c (amd64_return_value): Likewise.
* amd64-windows-tdep.c (amd64_windows_return_value): Likewise.
* arm-tdep.c (arm_return_value): Likewise.
* avr-tdep.c (avr_return_value): Likewise.
* bfin-tdep.c (bfin_return_value): Likewise.
* cris-tdep.c (cris_return_value): Likewise.
* frv-tdep.c (frv_return_value): Likewise.
* h8300-tdep.c (h8300_return_value): Likewise.
(h8300h_return_value): Likewise.
* hppa-tdep.c (hppa32_return_value): Likewise.
(hppa64_return_value): Likewise.
* i386-tdep.c (i386_return_value): Likewise.
* ia64-tdep.c (ia64_return_value): Likewise.
* iq2000-tdep.c (iq2000_return_value): Likewise.
* lm32-tdep.c (lm32_return_value): Likewise.
* m32c-tdep.c (m32c_return_value): Likewise.
* m32r-tdep.c (m32r_return_value): Likewise.
* m68hc11-tdep.c (m68hc11_return_value): Likewise.
* m68k-tdep.c (m68k_return_value): Likewise.
(m68k_svr4_return_value): Likewise.
* m88k-tdep.c (m88k_return_value): Likewise.
* mep-tdep.c (mep_return_value): Likewise.
* microblaze-tdep.c (microblaze_return_value): Likewise.
* mn10300-tdep.c (mn10300_return_value): Likewise.
* moxie-tdep.c (moxie_return_value): Likewise.
* mt-tdep.c (mt_return_value): Likewise.
* ppc-linux-tdep.c (ppc_linux_return_value): Likewise.
* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_return_value): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise.
* rl78-tdep.c (rl78_return_value): Likewise.
* rs6000-aix-tdep.c (rs6000_return_value): Likewise.
* rx-tdep.c (rx_return_value): Likewise.
* s390-tdep.c (s390_return_value): Likewise.
* score-tdep.c (score_return_value): Likewise.
* sh-tdep.c (sh_return_value_nofpu): Likewise.
(sh_return_value_fpu): Likewise.
* sh64-tdep.c (sh64_return_value): Likewise.
* sparc-tdep.c (sparc32_return_value): Likewise.
* sparc64-tdep.c (sparc64_return_value): Likewise.
* spu-tdep.c (spu_return_value): Likewise.
* tic6x-tdep.c (tic6x_return_value): Likewise.
* v850-tdep.c (v850_return_value): Likewise.
* vax-tdep.c (vax_return_value): Likewise.
* xstormy16-tdep.c (xstormy16_return_value): Likewise.
* xtensa-tdep.c (xtensa_return_value): Likewise.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
gdb/testsuite/
* gdb.base/return-nodebug.exp: Also test float and double types.
Now that this method is no longer used by any architecture,
we can remove its support.
gdb/ChangeLog:
* infcall.c (call_function_by_hand): Remove AT_SYMBOL handling.
* inferior.h (AT_SYMBOL): Delete.
symfile_flags.
* solib.c (solib_read_symbols): Use inferior's symfile_flags.
* linux-nat.c (linux_child_follow_fork): Set symfile_flags on
inferior.
* infrun.c (handle_vfork_child_exec_or_exit): Set symfile_flags on
inferior.
(follow_exec): Use inferior's symfile_flags.
* inferior.h (struct inferior) <symfile_flags>: New field.
Ulrich Weigand <ulrich.weigand@linaro.org>
* inferior.h (struct inferior): Add fake_pid_p.
* inferior.c (exit_inferior_1): Clear fake_pid_p.
* remote.c (remote_start_remote): Set fake_pid_p if we have to use
magic_null_ptid since the remote side doesn't provide a real PID.
The body of this function has been commented out since Jul 1999, and
thus seems unnecessary. While at it, remove some commented out code
that seems to be related to the function being deleted.
gdb/ChangeLog:
* corefile.c (close_exec_file): Delete.
(reopen_exec_file): Remove commented out code that seems related
to close_exec_file, which is being deleted here.
* inferior.h (close_exec_file): Delete.
* fork-child.c (fork_inferior): Remove call to fork_inferior.