diff options
author | Tom Tromey <tom@tromey.com> | 2020-09-28 19:38:25 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-09-28 19:52:21 -0600 |
commit | 55f6301ac03f8865f486fa2fe8019bd5129f86e3 (patch) | |
tree | 9d0673715cc0dfe18728c937ff30a32e1398a31b /gdb/remote.c | |
parent | 05374cfd90b59c62f9230baa19e71a3d9ed27269 (diff) | |
download | gdb-55f6301ac03f8865f486fa2fe8019bd5129f86e3.zip gdb-55f6301ac03f8865f486fa2fe8019bd5129f86e3.tar.gz gdb-55f6301ac03f8865f486fa2fe8019bd5129f86e3.tar.bz2 |
Remove target_has_execution macro
This removes the object-like macro target_has_execution, replacing it
with a function call. target_has_execution_current is also now
handled by this function.
gdb/ChangeLog
2020-09-28 Tom Tromey <tom@tromey.com>
* inferior.h (class inferior) <has_execution>: Update.
* windows-tdep.c (windows_solib_create_inferior_hook): Update.
* valops.c (find_function_in_inferior)
(value_allocate_space_in_inferior): Update.
* top.c (kill_or_detach): Update.
* target.c (target_preopen, set_target_permissions): Update.
(target_has_execution_current): Remove.
* sparc64-tdep.c (adi_examine_command, adi_assign_command):
Update.
* solib.c (update_solib_list, reload_shared_libraries): Update.
* solib-svr4.c (svr4_solib_create_inferior_hook): Update.
* solib-dsbt.c (enable_break): Update.
* score-tdep.c (score7_fetch_inst): Update.
* rs6000-nat.c (rs6000_nat_target::xfer_shared_libraries):
Update.
* remote.c (remote_target::start_remote)
(remote_target::remote_check_symbols, remote_target::open_1)
(remote_target::remote_detach_1, remote_target::verify_memory)
(remote_target::xfer_partial, remote_target::read_description)
(remote_target::get_min_fast_tracepoint_insn_len): Update.
* record-full.c (record_full_open_1): Update.
* record-btrace.c (record_btrace_target_open): Update.
* objc-lang.c (lookup_objc_class, lookup_child_selector)
(value_nsstring): Update.
* linux-thread-db.c (add_thread_db_info)
(thread_db_find_new_threads_silently, check_thread_db_callback)
(try_thread_db_load_1, record_thread): Update.
* linux-tdep.c (linux_info_proc, linux_vsyscall_range_raw):
Update.
* linux-fork.c (checkpoint_command): Update.
* infrun.c (set_non_stop, set_observer_mode)
(check_multi_target_resumption, for_each_just_stopped_thread)
(maybe_remove_breakpoints, normal_stop)
(class infcall_suspend_state): Update.
* infcmd.c (ERROR_NO_INFERIOR, kill_if_already_running)
(info_program_command, attach_command): Update.
* infcall.c (call_function_by_hand_dummy): Update.
* inf-loop.c (inferior_event_handler): Update.
* gcore.c (gcore_command, derive_heap_segment): Update.
* exec.c (exec_file_command): Update.
* eval.c (evaluate_subexp): Update.
* compile/compile.c (compile_to_object): Update.
* cli/cli-dump.c (restore_command): Update.
* breakpoint.c (update_watchpoint)
(update_inserted_breakpoint_locations)
(insert_breakpoint_locations, get_bpstat_thread): Update.
* target.h (target_has_execution): Remove macro.
(target_has_execution_current): Don't declare.
(target_has_execution): Rename from target_has_execution_1. Add
argument default.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 5fc80eb..1ef9b44 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4843,7 +4843,7 @@ remote_target::start_remote (int from_tty, int extended_p) } /* If we connected to a live target, do some additional setup. */ - if (target_has_execution) + if (target_has_execution ()) { if (symfile_objfile) /* No use without a symbol-file. */ remote_check_symbols (); @@ -4946,7 +4946,7 @@ remote_target::remote_check_symbols () but our current inferior is not running, we should not invite the remote target to request symbol lookups related to its (unrelated) current process. */ - if (!target_has_execution) + if (!target_has_execution ()) return; if (packet_support (PACKET_qSymbol) == PACKET_DISABLE) @@ -5544,7 +5544,7 @@ remote_target::open_1 (const char *name, int from_tty, int extended_p) /* If we're connected to a running target, target_preopen will kill it. Ask this question first, before target_preopen has a chance to kill anything. */ - if (curr_remote != NULL && !target_has_execution) + if (curr_remote != NULL && !target_has_execution ()) { if (from_tty && !query (_("Already connected to a remote target. Disconnect? "))) @@ -5727,7 +5727,7 @@ remote_target::remote_detach_1 (inferior *inf, int from_tty) struct remote_state *rs = get_remote_state (); int is_fork_parent; - if (!target_has_execution) + if (!target_has_execution ()) error (_("No process to detach from.")); target_announce_detach (from_tty); @@ -10718,7 +10718,8 @@ remote_target::verify_memory (const gdb_byte *data, CORE_ADDR lma, ULONGEST size /* It doesn't make sense to use qCRC if the remote target is connected but not running. */ - if (target_has_execution && packet_support (PACKET_qCRC) != PACKET_DISABLE) + if (target_has_execution () + && packet_support (PACKET_qCRC) != PACKET_DISABLE) { enum packet_result result; @@ -10980,7 +10981,7 @@ remote_target::xfer_partial (enum target_object object, /* If the remote target is connected but not running, we should pass this request down to a lower stratum (e.g. the executable file). */ - if (!target_has_execution) + if (!target_has_execution ()) return TARGET_XFER_EOF; if (writebuf != NULL) @@ -11720,7 +11721,7 @@ remote_target::read_description () /* Do not try this during initial connection, when we do not know whether there is a running but stopped thread. */ - if (!target_has_execution || inferior_ptid == null_ptid) + if (!target_has_execution () || inferior_ptid == null_ptid) return beneath ()->read_description (); if (!data->guesses.empty ()) @@ -13584,7 +13585,7 @@ remote_target::get_min_fast_tracepoint_insn_len () /* If we're not debugging a process yet, the IPA can't be loaded. */ - if (!target_has_execution) + if (!target_has_execution ()) return 0; /* Make sure the remote is pointing at the right process. */ |