aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/win32-low.cc
AgeCommit message (Collapse)AuthorFilesLines
2020-05-27Don't close process handle provided by WaitForDebugEventHannes Domani1-4/+15
Only the process handle returned by OpenProcess or CreateProcess needs to be closed, the one provided by WaitForDebugEvent is closed automatically. gdbserver/ChangeLog: 2020-05-27 Hannes Domani <ssbssa@yahoo.de> * win32-low.cc (do_initial_child_stuff): Set open_process_used. (win32_clear_inferiors): Use open_process_used. (get_child_debug_event): Likewise.
2020-05-25Use construct_inferior_arguments which handles special charsMichael Weghorn1-1/+1
Use the construct_inferior_arguments function instead of stringify_argv to construct a string from the program arguments in those places where that one is then passed to fork_inferior (linux-low, lyn-low), since construct_inferior_arguments properly takes care of special characters, while stringify_argv does not. Using construct_inferior_arguments seems "natural", since its documentation also mentions that it "does the same shell processing as fork_inferior". Since construct_inferior_args has been extended to do proper quoting for Windows shells in commit 5d60742e2dd3c9b475dce54b56043a358751bbb8 ("Fix quoting of special characters for the MinGW build.", 2012-06-12), use it for the Windows case as well. (I could not test that case myself, though.) Adapt handling of empty args in function 'handle_v_run' in gdbserver/server.cc to just insert an empty string for an empty arg, since that one is now properly handled in 'construct_inferior_arguments' already (and inserting a "''" string in 'handle_v_run' would otherwise cause that one to be treated as a string literally containing two quote characters, which 'construct_inferior_args' would preserve by adding extra escaping). This makes gdbserver properly handle program args containing special characters (like spaces), e.g. (example from PR25893) $ gdbserver localhost:50505 myprogram "hello world" now properly handles "hello world" as a single arg, not two separate ones ("hello", "world"). gdbserver/ChangeLog: PR gdbserver/25893 * linux-low.cc (linux_process_target::create_inferior), lynx-low.cc (lynx_process_target::create_inferior), win32-low.cc (win32_process_target::create_inferior): Use construct_inferior_arguments instead of stringify_argv to get string representation which properly escapes special characters. * server.cc (handle_v_run): Just pass empty program arg as such, since any further processing is now handled via construct_inferior_arguments. Change-Id: Ibf963fcd51415c948840fb463289516b3479b0c3
2020-04-30Implement debugging of WOW64 processes in gdbserverHannes Domani1-25/+214
gdbserver/ChangeLog: 2020-04-30 Hannes Domani <ssbssa@yahoo.de> * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj): Add arch/i386.o. * win32-arm-low.cc (arm_num_regs): New function. (struct win32_target_ops): Use arm_num_regs. * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64 processes. (i386_get_thread_context): Likewise. (i386_prepare_to_resume): Likewise. (i386_thread_added): Likewise. (i386_single_step): Likewise. (i386_fetch_inferior_register): Likewise. (i386_store_inferior_register): Likewise. (i386_arch_setup): Likewise. (i386_win32_num_regs): New function. (struct win32_target_ops): Use i386_win32_num_regs. * win32-low.cc (win32_get_thread_context): Adapt for WOW64 processes. (win32_require_context): Likewise. (child_add_thread): Likewise. (do_initial_child_stuff): Likewise. (continue_one_thread): Likewise. (win32_process_target::resume): Likewise. (load_psapi): Likewise. (win32_add_all_dlls): Likewise. (maybe_adjust_pc): Likewise. (win32_process_target::qxfer_siginfo): Likewise. (initialize_low): Likewise. * win32-low.h (struct win32_target_ops): Change num_regs to callback function.
2020-04-16Fix Cygwin gdb buildTom Tromey1-0/+8
Simon pointed out that the windows-nat sharing series broke the Cygwin build. This patch fixes the problem, by moving the Cygwin-specific code to a new handler function. This approach is taken because this code calls find_pc_partial_function, which isn't available in gdbserver. gdb/ChangeLog 2020-04-16 Tom Tromey <tromey@adacore.com> * windows-nat.c (windows_nat::handle_access_violation): New function. * nat/windows-nat.h (handle_access_violation): Declare. * nat/windows-nat.c (handle_exception): Move Cygwin code to windows-nat.c. Call handle_access_violation. gdbserver/ChangeLog 2020-04-16 Tom Tromey <tromey@adacore.com> * win32-low.cc (windows_nat::handle_access_violation): New function.
2020-04-15gdbserver: fix format string warning in win32-low.ccSimon Marchi1-1/+1
When compiling on Cygwin, we get: CXX win32-low.o /home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc: In function ‘int get_child_debug_event(DWORD*, target_waitstatus*)’: /home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:1459:17: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Werror=format=] 1459 | OUTMSG2 (("get_windows_debug_event - " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1460 | "unexpected stop in 0x%x (expecting 0x%x)\n", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1461 | ptid.lwp (), desired_stop_thread_id)); | ~~~~~~~~~~~ | | | long int /home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:52:11: note: in definition of macro ‘OUTMSG2’ 52 | printf X; \ | ^ /home/smarchi/src/binutils-gdb/gdbserver/win32-low.cc:1460:26: note: format string is defined here 1460 | "unexpected stop in 0x%x (expecting 0x%x)\n", | ~^ | | | unsigned int | %lx `ptid.lwp ()` is a `long` value, so it indeed needs the `l` size modifier. gdbserver/ChangeLog: * win32-low.cc (get_child_debug_event): Fix format string warning.
2020-04-08Add pending stop support to gdbserver's Windows portTom Tromey1-3/+31
This changes gdbserver to also handle pending stops, the same way that gdb does. This is PR gdb/22992. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> PR gdb/22992 * win32-low.c (child_continue): Call matching_pending_stop. (get_child_debug_event): Call fetch_pending_stop. Push pending stop when needed.
2020-04-08Implement stopped_by_sw_breakpoint for Windows gdbserverTom Tromey1-12/+55
This changes the Windows gdbserver port to implement the stopped_by_sw_breakpoint target method. This is needed to support pending stops. This is a separate patch now, because Pedro suggested splitting it out for simpler bisecting, in the case that it introduces a bug. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (win32_process_target::stopped_by_sw_breakpoint) (win32_process_target::supports_stopped_by_sw_breakpoint): Declare. * win32-low.c (win32_supports_z_point_type): Always handle Z_PACKET_SW_BP. (win32_insert_point): Call insert_memory_breakpoint when needed. (win32_remove_point): Call remove_memory_breakpoint when needed. (win32_process_target::stopped_by_sw_breakpoint) (win32_process_target::supports_stopped_by_sw_breakpoint): New methods. (win32_target_ops): Update. (maybe_adjust_pc): New function. (win32_wait): Call maybe_adjust_pc.
2020-04-08Add read_pc / write_pc support to win32-lowTom Tromey1-0/+12
This changes win32-low.c to implement the read_pc and write_pc methods. A subsequent patch will need these. Note that I have no way to test, or even compile, the win32-arm-low.c change. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (win32_process_target::read_pc) (win32_process_target::write_pc): Declare. * win32-low.c (win32_process_target::read_pc) (win32_process_target::write_pc): New methods. * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New functions. (the_low_target): Update. * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New functions. (the_low_target): Update.
2020-04-08Move wait_for_debug_event to nat/windows-nat.cTom Tromey1-3/+3
This moves the wait_for_debug_event helper function to nat/windows-nat.c, and changes gdbserver to use it. wait_for_debug_event is a wrapper for WaitForDebugEvent that also sets last_wait_event when appropriate. This is needed to properly handle queued stops. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (wait_for_debug_event): Move to nat/windows-nat.c. * nat/windows-nat.h (wait_for_debug_event): Declare. * nat/windows-nat.c (wait_for_debug_event): Move from windows-nat.c. No longer static. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (win32_kill, get_child_debug_event): Use wait_for_debug_event.
2020-04-08Share some inferior-related Windows codeTom Tromey1-6/+1
This adds a couple of functions to nat/windows-nat.c and changes gdb and gdbserver to use them. One function checks the list of pending stops for a match (not yet used by gdbserver, but will be in a subsequent patch); and the other is a wrapper for ContinueDebugEvent that always uses the last "real" stop event. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (windows_continue): Use matching_pending_stop and continue_last_debug_event. * nat/windows-nat.h (matching_pending_stop) (continue_last_debug_event): Declare. * nat/windows-nat.c (DEBUG_EVENTS): New define. (matching_pending_stop, continue_last_debug_event): New functions. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (child_continue): Call continue_last_debug_event.
2020-04-08Share handle_exceptionTom Tromey1-115/+17
Both gdb and gdbserver have a "handle_exception" function, the bulk of which is shared between the two implementations. This patch arranges for the entire thing to be moved into nat/windows-nat.c, with the differences handled by callbacks. This patch introduces one more callback to make this possible. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c. (handle_exception_result): Move to nat/windows-nat.h. (DEBUG_EXCEPTION_SIMPLE): Remove. (windows_nat::handle_ms_vc_exception): New function. (handle_exception): Move to nat/windows-nat.c. (get_windows_debug_event): Update. (STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to nat/windows-nat.c. * nat/windows-nat.h (handle_ms_vc_exception): Declare. (handle_exception_result): Move from windows-nat.c. (handle_exception): Declare. * nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception) (STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from windows-nat.c. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (handle_exception): Remove. (windows_nat::handle_ms_vc_exception): New function. (get_child_debug_event): Add "continue_status" parameter. Update. (win32_wait): Update.
2020-04-08Share handle_load_dll and handle_unload_dll declarationsTom Tromey1-16/+6
This changes nat/windows-nat.h to declare handle_load_dll and handle_unload_dll. The embedding application is required to implement these -- while the actual code was difficult to share due to some other differences between the two programs, sharing the declaration lets a subsequent patch share more code that uses these as callbacks. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (windows_nat::handle_load_dll) (windows_nat::handle_unload_dll): Rename. No longer static. * nat/windows-nat.h (handle_load_dll, handle_unload_dll): Declare. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (windows_nat::handle_load_dll): Rename from handle_load_dll. No longer static. (windows_nat::handle_unload_dll): Rename from handle_unload_dll. No longer static.
2020-04-08Normalize handle_output_debug_string APITom Tromey1-9/+12
This changes gdbserver's implementation of handle_output_debug_string to have the same calling convention as that of gdb. This allows for sharing some more code in a subsequent patch. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (windows_nat::handle_output_debug_string): Rename. No longer static. * nat/windows-nat.h (handle_output_debug_string): Declare. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (handle_output_debug_string): Add parameter. Change return type. (win32_kill, get_child_debug_event): Update.
2020-04-08Share some Windows-related globalsTom Tromey1-8/+0
This moves some Windows-related globals into nat/windows-nat.c, sharing them between gdb and gdbserver. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (struct pending_stop, siginfo_er): Move to nat/windows-nat.c. (display_selectors, fake_create_process) (get_windows_debug_event): Update. * nat/windows-nat.h (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (struct pending_stop, siginfo_er): Move from windows-nat.c. * nat/windows-nat.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, last_wait_event) (current_windows_thread, desired_stop_thread_id, pending_stops) (siginfo_er): New globals. Move from windows-nat.c. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (current_process_handle, current_process_id) (main_thread_id, last_sig, current_event, siginfo_er): Move to nat/windows-nat.c.
2020-04-08Share get_image_name between gdb and gdbserverTom Tromey1-50/+1
This moves get_image_name to nat/windows-nat.c so that it can be shared between gdb and gdbserver. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (get_image_name): Move to nat/windows-nat.c. (handle_load_dll): Update. * nat/windows-nat.c (get_image_name): Move from windows-nat.c. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (get_image_name): Remove. (handle_load_dll): Update.
2020-04-08Share thread_rec between gdb and gdbserverTom Tromey1-10/+12
This changes gdb and gdbserver to use the same calling convention for the "thread_rec" helper function. Fully merging these is difficult due to differences in how threads are managed by the enclosing applications; but sharing a declaration makes it possible for future shared code to call this method. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (enum thread_disposition_type): Move to nat/windows-nat.h. (windows_nat::thread_rec): Rename from thread_rec. No longer static. (windows_add_thread, windows_nat_target::fetch_registers) (windows_nat_target::store_registers, handle_exception) (windows_nat_target::resume, get_windows_debug_event) (windows_nat_target::get_tib_address) (windows_nat_target::thread_name) (windows_nat_target::thread_alive): Update. * nat/windows-nat.h (enum thread_disposition_type): Move from windows-nat.c. (thread_rec): Declare. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (windows_nat::thread_rec): Rename from thread_rec. No longer static. Change parameters. (child_add_thread, child_fetch_inferior_registers) (child_store_inferior_registers, win32_resume) (win32_get_tib_address): Update.
2020-04-08Wrap shared windows-nat code in windows_nat namespaceTom Tromey1-0/+2
This wraps the shared windows-nat code in a windows_nat namespace. This helps avoid name clashes. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c: Add "using namespace". * nat/windows-nat.h: Wrap contents in windows_nat namespace. * nat/windows-nat.c: Wrap contents in windows_nat namespace. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (struct win32_target_ops): Use qualified names where needed. * win32-i386-low.c: Add "using namespace". * win32-low.c: Add "using namespace". * win32-arm-low.c: Add "using namespace".
2020-04-08Call CloseHandle from ~windows_thread_infoTom Tromey1-1/+0
Add a destructor to windows_thread_info that calls CloseHandle. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * nat/windows-nat.h (struct windows_thread_info): Declare destructor. * nat/windows-nat.c (~windows_thread_info): New. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (delete_thread_info): Don't call CloseHandle.
2020-04-08Share Windows thread-suspend and -resume codeTom Tromey1-30/+3
This adds "suspend" and "resume" methods to windows_thread_info, and changes gdb and gdbserver to share this code. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (thread_rec): Use windows_thread_info::suspend. (windows_continue): Use windows_continue::resume. * nat/windows-nat.h (struct windows_thread_info) <suspend, resume>: Declare new methods. * nat/windows-nat.c: New file. * configure.nat (NATDEPFILES): Add nat/windows-nat.o when needed. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (win32_require_context, suspend_one_thread): Use windows_thread_info::suspend. (continue_one_thread): Use windows_thread_info::resume. * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
2020-04-08Use new and delete for windows_thread_infoTom Tromey1-5/+2
This adds a constructor, destructor, and member initializers to windows_thread_info, and changes gdb and gdbserver to use new and delete. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (windows_add_thread): Use new. (windows_init_thread_list, windows_delete_thread): Use delete. (get_windows_debug_event): Update. * nat/windows-nat.h (struct windows_thread_info): Add constructor, destructor, and initializers. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.c (child_add_thread): Use new. (delete_thread_info): Use delete.
2020-04-08Rename win32_thread_info to windows_thread_infoTom Tromey1-16/+16
This renames win32_thread_info to windows_thread_info in gdbserver. This renaming helps make it possible to share some code between gdb and gdbserver. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (struct windows_thread_info): Rename from win32_thread_info. Remove typedef. (struct win32_target_ops, win32_require_context): Update. * win32-low.c (win32_get_thread_context) (win32_set_thread_context, win32_prepare_to_resume) (win32_require_context, thread_rec, child_add_thread) (delete_thread_info, continue_one_thread) (child_fetch_inferior_registers, child_store_inferior_registers) (win32_resume, suspend_one_thread, win32_get_tib_address): Update. * win32-i386-low.c (update_debug_registers) (win32_get_current_dr, i386_get_thread_context) (i386_prepare_to_resume, i386_thread_added, i386_single_step) (i386_fetch_inferior_register, i386_store_inferior_register): Update. * win32-arm-low.c (arm_get_thread_context) (arm_fetch_inferior_register, arm_store_inferior_register): Update.
2020-02-20gdbserver: finish turning the target ops vector into a classTankut Baris Aktemur1-7/+3
Now that 'process_stratum_target' has a single field left, namely 'pt' of type 'process_target', and that all the requests to a 'process_stratum_target' are forwarded to 'pt', meld the 'process_target' class into 'process_stratum_target'. This essentially means 1. All the references of the form 'the_target->pt' become 'the_target'. 2. All the uses of the name 'process_target' become 'process_stratum_target'. 3. The platform-specific target op vectors (e.g. linux_target_ops) are removed and instances of their "process target" classes are used instead. gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * target.h (struct process_stratum_target): Remove. (class process_target): Rename to ... (class process_stratum_target): ... this. * linux-low.h (class linux_process_target): Derive from 'process_stratum_target'. * linux-low.cc (linux_target_ops): Remove. (initialize_low): Set the_target to the singleton instance of linux_process_target. * lynx-low.h (class lynx_process_target): Derive from 'process_stratum_target'. * lynx-low.cc (lynx_target_ops): Remove. (initialize_low): Set the_target to the singleton instance of lynx_process_target. * nto-low.h (class nto_process_target): Derive from 'process_stratum_target'. * nto-low.cc (nto_target_ops): Remove. (initialize_low): Set the_target to the singleton instance of nto_process_target. * win32-low.h (class win32_process_target): Derive from 'process_stratum_target'. * win32-low.cc (win32_target_ops): Remove. (initialize_low): Set the_target to the singleton instance of win32_process_target. Replace 'the_target->pt' with 'the_target' in the uses below. * hostio.cc (hostio_error) (handle_setfs) (handle_open) (handle_unlink) (handle_readlink) * linux-aarch32-low.cc (arm_breakpoint_at) * linux-aarch64-low.cc (aarch64_breakpoint_at) * linux-arm-low.cc (arm_sigreturn_next_pc) (arm_get_hwcap) (arm_get_syscall_trapinfo) * linux-cris-low.cc (cris_breakpoint_at) * linux-crisv32-low.cc (cris_breakpoint_at) * linux-low.cc (handle_extended_wait) (linux_wait_1) (linux_read_memory) (linux_process_target::breakpoint_kind_from_pc) (linux_get_auxv) * linux-m32r-low.cc (m32r_breakpoint_at) * linux-mips-low.cc (mips_breakpoint_at) * linux-nios2-low.cc (nios2_breakpoint_at) * linux-ppc-low.cc (ppc_breakpoint_at) * linux-s390-low.cc (s390_get_hwcap) * linux-sh-low.cc (sh_breakpoint_at) * linux-sparc-low.cc (sparc_fill_gregset_to_stack) (sparc_store_gregset_from_stack) (sparc_breakpoint_at) * linux-tic6x-low.cc (tic6x_breakpoint_at) * linux-tile-low.cc (tile_breakpoint_at) * linux-x86-low.cc (x86_breakpoint_at) * linux-xtensa-low.cc (xtensa_breakpoint_at) * mem-break.cc (bp_size) (bp_opcode) (insert_memory_breakpoint) (set_raw_breakpoint_at) (delete_raw_breakpoint) (z_type_supported) (uninsert_raw_breakpoint) (reinsert_raw_breakpoint) (validate_inserted_breakpoint) * regcache.cc (regcache_read_pc) (regcache_write_pc) * remote-utils.cc (putpkt_binary_1) (input_interrupt) (getpkt) (prepare_resume_reply) * server.cc (handle_general_set) (handle_detach) (handle_qxfer_auxv) (handle_qxfer_exec_file) (handle_qxfer_libraries_svr4) (handle_qxfer_osdata) (handle_qxfer_siginfo) (handle_qxfer_fdpic) (handle_query) (resume) (handle_v_requests) (queue_stop_reply_callback) (captured_main) * target.cc (prepare_to_access_memory) (done_accessing_memory) (read_inferior_memory) (target_write_memory) (target_stop_and_wait) (target_wait) (target_mourn_inferior) (target_continue_no_signal) (target_continue) (target_supports_multi_process) (kill_inferior) * target.h (target_create_inferior) (target_post_create_inferior) (myattach) (target_supports_fork_events) (target_supports_vfork_events) (target_supports_exec_events) (target_handle_new_gdb_connection) (detach_inferior) (mythread_alive) (fetch_inferior_registers) (store_inferior_registers) (join_inferior) (target_supports_non_stop) (target_async) (target_process_qsupported) (target_supports_catch_syscall) (target_get_ipa_tdesc_idx) (target_supports_tracepoints) (target_supports_fast_tracepoints) (target_get_min_fast_tracepoint_insn_len) (target_thread_stopped) (target_pause_all) (target_unpause_all) (target_stabilize_threads) (target_install_fast_tracepoint_jump_pad) (target_emit_ops) (target_supports_disable_randomization) (target_supports_agent) (target_enable_btrace) (target_disable_btrace) (target_read_btrace) (target_read_btrace_conf) (target_supports_range_stepping) (target_supports_stopped_by_sw_breakpoint) (target_stopped_by_sw_breakpoint) (target_supports_stopped_by_hw_breakpoint) (target_supports_hardware_single_step) (target_stopped_by_hw_breakpoint) (target_breakpoint_kind_from_pc) (target_breakpoint_kind_from_current_state) (target_supports_software_single_step) (target_core_of_thread) (target_thread_name) (target_thread_handle) * win32-low.cc (do_initial_child_stuff) Rename target op default definitions listed below. * target.cc (process_target::post_create_inferior): Rename as ... (process_stratum_target::post_create_inferior): ... this. (process_target::prepare_to_access_memory): Rename as ... (process_stratum_target::prepare_to_access_memory): ... this. (process_target::done_accessing_memory): Rename as ... (process_stratum_target::done_accessing_memory): ... this. (process_target::look_up_symbols): Rename as ... (process_stratum_target::look_up_symbols): ... this. (process_target::supports_read_auxv): Rename as ... (process_stratum_target::supports_read_auxv): ... this. (process_target::read_auxv): Rename as ... (process_stratum_target::read_auxv): ... this. (process_target::supports_z_point_type): Rename as ... (process_stratum_target::supports_z_point_type): ... this. (process_target::insert_point): Rename as ... (process_stratum_target::insert_point): ... this. (process_target::remove_point): Rename as ... (process_stratum_target::remove_point): ... this. (process_target::stopped_by_sw_breakpoint): Rename as ... (process_stratum_target::stopped_by_sw_breakpoint): ... this. (process_target::supports_stopped_by_sw_breakpoint): Rename as ... (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this. (process_target::stopped_by_hw_breakpoint): Rename as ... (process_stratum_target::stopped_by_hw_breakpoint): ... this. (process_target::supports_stopped_by_hw_breakpoint): Rename as ... (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this. (process_target::supports_hardware_single_step): Rename as ... (process_stratum_target::supports_hardware_single_step): ... this. (process_target::stopped_by_watchpoint): Rename as ... (process_stratum_target::stopped_by_watchpoint): ... this. (process_target::stopped_data_address): Rename as ... (process_stratum_target::stopped_data_address): ... this. (process_target::supports_read_offsets): Rename as ... (process_stratum_target::supports_read_offsets): ... this. (process_target::read_offsets): Rename as ... (process_stratum_target::read_offsets): ... this. (process_target::supports_get_tls_address): Rename as ... (process_stratum_target::supports_get_tls_address): ... this. (process_target::get_tls_address): Rename as ... (process_stratum_target::get_tls_address): ... this. (process_target::hostio_last_error): Rename as ... (process_stratum_target::hostio_last_error): ... this. (process_target::supports_qxfer_osdata): Rename as ... (process_stratum_target::supports_qxfer_osdata): ... this. (process_target::qxfer_osdata): Rename as ... (process_stratum_target::qxfer_osdata): ... this. (process_target::supports_qxfer_siginfo): Rename as ... (process_stratum_target::supports_qxfer_siginfo): ... this. (process_target::qxfer_siginfo): Rename as ... (process_stratum_target::qxfer_siginfo): ... this. (process_target::supports_non_stop): Rename as ... (process_stratum_target::supports_non_stop): ... this. (process_target::async): Rename as ... (process_stratum_target::async): ... this. (process_target::start_non_stop): Rename as ... (process_stratum_target::start_non_stop): ... this. (process_target::supports_multi_process): Rename as ... (process_stratum_target::supports_multi_process): ... this. (process_target::supports_fork_events): Rename as ... (process_stratum_target::supports_fork_events): ... this. (process_target::supports_vfork_events): Rename as ... (process_stratum_target::supports_vfork_events): ... this. (process_target::supports_exec_events): Rename as ... (process_stratum_target::supports_exec_events): ... this. (process_target::handle_new_gdb_connection): Rename as ... (process_stratum_target::handle_new_gdb_connection): ... this. (process_target::handle_monitor_command): Rename as ... (process_stratum_target::handle_monitor_command): ... this. (process_target::core_of_thread): Rename as ... (process_stratum_target::core_of_thread): ... this. (process_target::supports_read_loadmap): Rename as ... (process_stratum_target::supports_read_loadmap): ... this. (process_target::read_loadmap): Rename as ... (process_stratum_target::read_loadmap): ... this. (process_target::process_qsupported): Rename as ... (process_stratum_target::process_qsupported): ... this. (process_target::supports_tracepoints): Rename as ... (process_stratum_target::supports_tracepoints): ... this. (process_target::read_pc): Rename as ... (process_stratum_target::read_pc): ... this. (process_target::write_pc): Rename as ... (process_stratum_target::write_pc): ... this. (process_target::supports_thread_stopped): Rename as ... (process_stratum_target::supports_thread_stopped): ... this. (process_target::thread_stopped): Rename as ... (process_stratum_target::thread_stopped): ... this. (process_target::supports_get_tib_address): Rename as ... (process_stratum_target::supports_get_tib_address): ... this. (process_target::get_tib_address): Rename as ... (process_stratum_target::get_tib_address): ... this. (process_target::pause_all): Rename as ... (process_stratum_target::pause_all): ... this. (process_target::unpause_all): Rename as ... (process_stratum_target::unpause_all): ... this. (process_target::stabilize_threads): Rename as ... (process_stratum_target::stabilize_threads): ... this. (process_target::supports_fast_tracepoints): Rename as ... (process_stratum_target::supports_fast_tracepoints): ... this. (process_target::get_min_fast_tracepoint_insn_len): Rename as ... (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this. (process_target::emit_ops): Rename as ... (process_stratum_target::emit_ops): ... this. (process_target::supports_disable_randomization): Rename as ... (process_stratum_target::supports_disable_randomization): ... this. (process_target::supports_qxfer_libraries_svr4): Rename as ... (process_stratum_target::supports_qxfer_libraries_svr4): ... this. (process_target::qxfer_libraries_svr4): Rename as ... (process_stratum_target::qxfer_libraries_svr4): ... this. (process_target::supports_agent): Rename as ... (process_stratum_target::supports_agent): ... this. (process_target::enable_btrace): Rename as ... (process_stratum_target::enable_btrace): ... this. (process_target::disable_btrace): Rename as ... (process_stratum_target::disable_btrace): ... this. (process_target::read_btrace): Rename as ... (process_stratum_target::read_btrace): ... this. (process_target::read_btrace_conf): Rename as ... (process_stratum_target::read_btrace_conf): ... this. (process_target::supports_range_stepping): Rename as ... (process_stratum_target::supports_range_stepping): ... this. (process_target::supports_pid_to_exec_file): Rename as ... (process_stratum_target::supports_pid_to_exec_file): ... this. (process_target::pid_to_exec_file): Rename as ... (process_stratum_target::pid_to_exec_file): ... this. (process_target::supports_multifs): Rename as ... (process_stratum_target::supports_multifs): ... this. (process_target::multifs_open): Rename as ... (process_stratum_target::multifs_open): ... this. (process_target::multifs_unlink): Rename as ... (process_stratum_target::multifs_unlink): ... this. (process_target::multifs_readlink): Rename as ... (process_stratum_target::multifs_readlink): ... this. (process_target::breakpoint_kind_from_pc): Rename as ... (process_stratum_target::breakpoint_kind_from_pc): ... this. (process_target::breakpoint_kind_from_current_state): Rename as ... (process_stratum_target::breakpoint_kind_from_current_state): ... this. (process_target::thread_name): Rename as ... (process_stratum_target::thread_name): ... this. (process_target::thread_handle): Rename as ... (process_stratum_target::thread_handle): ... this. (process_target::supports_software_single_step): Rename as ... (process_stratum_target::supports_software_single_step): ... this. (process_target::supports_catch_syscall): Rename as ... (process_stratum_target::supports_catch_syscall): ... this. (process_target::get_ipa_tdesc_idx): Rename as ... (process_stratum_target::get_ipa_tdesc_idx): ... this.
2020-02-20gdbserver: turn target op 'get_ipa_tdesc_idx' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's get_ipa_tdesc_idx op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_get_ipa_tdesc_idx): Update the macro. * target.cc (process_target::get_ipa_tdesc_idx): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_get_ipa_tdesc_idx): Turn into ... (linux_process_target::get_ipa_tdesc_idx): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_catch_syscall' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_catch_syscall op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_catch_syscall): Update the macro. * target.cc (process_target::supports_catch_syscall): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_catch_syscall): Turn into ... (linux_process_target::supports_catch_syscall): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_software_single_step' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_software_single_step op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_software_single_step): Update the macro. * target.cc (process_target::supports_software_single_step): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_software_single_step): Turn into ... (linux_process_target::supports_software_single_step): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target ops 'thread_name' and 'thread_handle' into methodsTankut Baris Aktemur1-2/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's thread_name and thread_handle ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (target_thread_name): Update the macro. (target_thread_handle): Update the macro. * target.cc (process_target::thread_name): Define. (process_target::thread_handle): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_process_target::thread_name): Define. (linux_process_target::thread_handle): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn breakpoint kind-related target ops into methodsTankut Baris Aktemur1-5/+2
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's breakpoint_kind_from_pc, sw_breakpoint_from_kind, and breakpoint_kind_from_current_state ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_breakpoint_kind_from_pc): Update the macro. (target_breakpoint_kind_from_current_state): Update the macro. (default_breakpoint_kind_from_pc): Remove declaration. * target.cc (default_breakpoint_kind_from_pc): Turn into ... (process_target::breakpoint_kind_from_pc): ... this. (process_target::breakpoint_kind_from_current_state): Define. Update the derived classes and callers below. * mem-break.cc (bp_size): Update. (bp_opcode): Update. * linux-low.cc (linux_target_ops): Update. (linux_wait_1): Update. (linux_breakpoint_kind_from_pc): Turn into ... (linux_process_target::breakpoint_kind_from_pc): ... this. (linux_sw_breakpoint_from_kind): Turn into ... (linux_process_target::sw_breakpoint_from_kind): ... this. (linux_breakpoint_kind_from_current_state): Turn into ... (linux_process_target::breakpoint_kind_from_current_state): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. (lynx_process_target::sw_breakpoint_from_kind): Define. * lynx-low.h (class lynx_process_target): Update. * nto-low.cc (nto_target_ops): Update. (nto_sw_breakpoint_from_kind): Turn into ... (nto_process_target::sw_breakpoint_from_kind): ... this. * nto-low.h (class nto_process_target): Update. * win32-low.cc (win32_target_ops): Update. (win32_sw_breakpoint_from_kind): Turn into ... (win32_process_target::sw_breakpoint_from_kind): ... this. * win32-low.h (class win32_process_target): Update.
2020-02-20gdbserver: turn target ops 'multifs_{open, readlink, unlink}' into methodsTankut Baris Aktemur1-3/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's multifs_open, multifs_readlink, multifs_unlink ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. Also add 'supports_multifs'. * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and "sys/stat.h". (process_target::supports_multifs): Define. (process_target::multifs_open): Define. (process_target::multifs_readlink): Define. (process_target::multifs_unlink): Define. Update the derived classes and callers below. * hostio.cc (handle_setfs): Update. (handle_open): Update. (handle_unlink): Update. (handle_readlink): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_multifs): Define. (linux_process_target::multifs_open): Define. (linux_process_target::multifs_readlink): Define. (linux_process_target::multifs_unlink): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'pid_to_exec_file' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's pid_to_exec_file op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_pid_to_exec_file'. * target.cc (process_target::pid_to_exec_file): Define. (process_target::supports_pid_to_exec_file): Define. Update the derived classes and callers below. * server.cc (handle_qxfer_exec_file): Update. (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_pid_to_exec_file): Define. (linux_process_target::pid_to_exec_file): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_range_stepping' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_range_stepping op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_range_stepping): Update the macro. * target.cc (process_target::supports_range_stepping): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_range_stepping): Turn into ... (linux_process_target::supports_range_stepping): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn btrace-related target ops into methodsTankut Baris Aktemur1-4/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's btrace-related ops (enable_btrace, disable_btrace, read_btrace, read_btrace_conf) into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (target_enable_btrace): Update. (target_disable_btrace): Update. (target_read_btrace): Update. (target_read_btrace_conf): Update. * target.cc (process_target::enable_btrace): Define. (process_target::disable_btrace): Define. (process_target::read_btrace): Define. (process_target::read_btrace_conf): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_process_target:enable_btrace): Define as a wrapper around linux_enable_btrace. (linux_low_disable_btrace): Turn into ... (linux_process_target::disable_btrace): ... this. (linux_low_read_btrace): Turn into ... (linux_process_target::read_btrace): ... this. (linux_low_btrace_conf): Turn into ... (linux_process_target::read_btrace_conf): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_agent' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_agent op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_agent): Update the macro. * target.cc (process_target::supports_agent): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_agent): Turn into ... (linux_process_target::supports_agent): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'qxfer_libraries_svr4' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's qxfer_libraries_svr4 op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_qxfer_libraries_svr4'. * target.cc (process_target::qxfer_libraries_svr4): Define. (process_target::supports_qxfer_libraries_svr4): Define. Update the derived classes and callers below. * server.cc (handle_qxfer_libraries_svr4): Update. (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_qxfer_libraries_svr4): Define. (linux_qxfer_libraries_svr4): Turn into ... (linux_process_target::qxfer_libraries_svr4): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_disable_randomization' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_disable_randomization op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_disable_randomization): Update the macro. * target.cc (process_target::supports_disable_randomization): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_disable_randomization): Turn into ... (linux_process_target::supports_disable_randomization): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'emit_ops' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's emit_ops op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_emit_ops): Update the macro. * target.cc (process_target::emit_ops): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_emit_ops): Turn into ... (linux_process_target::emit_ops): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn fast tracepoint target ops into methodsTankut Baris Aktemur1-2/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's install_fast_tracepoint_jump_pad and get_min_fast_tracepoint_insn_len ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. Also add 'supports_fast_tracepoints'. (target_supports_fast_tracepoints): Update the macro. (target_get_min_fast_tracepoint_insn_len): Update the macro. (install_fast_tracepoint_jump_pad): Update and rename the macro to ... (target_install_fast_tracepoint_jump_pad): ... this. * target.cc (process_target::supports_fast_tracepoints): Define. (process_target::install_fast_tracepoint_jump_pad): Define. (process_target::get_min_fast_tracepoint_insn_len): Define. Update the derived classes and callers below. * tracepoint.cc (install_fast_tracepoint): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_fast_tracepoints): Define. (linux_install_fast_tracepoint_jump_pad): Turn into ... (linux_process_target::install_fast_tracepoint_jump_pad): ... this. (linux_get_min_fast_tracepoint_insn_len): Turn into ... (linux_process_target::get_min_fast_tracepoint_insn_len): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'stabilize_threads' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's stabilize_threads op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_stabilize_threads): Update the macro. * target.cc (process_target::stabilize_threads): Define. Update the derived classes and callers below. * server.cc (handle_status): Update. * tracepoint.cc (cmd_qtdp): Update. (cmd_qtstart): Update. * linux-low.cc (linux_target_ops): Update. (linux_stabilize_threads): Turn into ... (linux_process_target::stabilize_threads): ... this. (linux_wait_1): Update. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target ops 'pause_all' and 'unpause_all' into methodsTankut Baris Aktemur1-2/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's pause_all and unpause_all ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (pause_all): Update the macro and rename to... (target_pause_all): ... this. (unpause_all): Update the macro and rename to... (target_unpause_all): ... this. * target.cc (process_target::pause_all): Define. (process_target::unpause_all): Define. Update the derived classes and callers below. * server.cc (handle_status): Update. * tracepoint.cc (clear_installed_tracepoints): Update. (cmd_qtdp): Update. (cmd_qtstart): Update. (stop_tracing): Update. (cmd_qtstatus): Update. (upload_fast_traceframes): Update. (run_inferior_command): Update. * linux-low.cc (linux_target_ops): Update. (linux_pause_all): Turn into ... (linux_process_target::pause_all): ... this. (linux_unpause_all): Turn into ... (linux_process_target::unpause_all): ... this. (linux_process_target::prepare_to_access_memory): Update. (linux_process_target::done_accessing_memory): Update. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'get_tib_address' into a methodTankut Baris Aktemur1-3/+8
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's get_tib_address op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_get_tib_address'. * target.cc (process_target::get_tib_address): Define. (process_target::supports_get_tib_address): Define. Update the derived classes and callers below. * server.cc (handle_query): Update. * linux-low.cc (win32_target_ops): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update. (win32_process_target::supports_get_tib_address): Define. (win32_get_tib_address): Turn into ... (win32_process_target::get_tib_address): ... this. * win32-low.h (class win32_process_target): Update.
2020-02-20gdbserver: turn target op 'thread_stopped' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's thread_stopped op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_thread_stopped'. (target_thread_stopped): Update the macro. * target.cc (process_target::thread_stopped): Define. (process_target::supports_thread_stopped): Define. (prepare_to_access_memory): Update. Update the derived classes and callers below. * server.cc (queue_stop_reply_callback): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_thread_stopped): Define. (linux_thread_stopped): Turn into ... (linux_process_target::thread_stopped): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target ops 'read_pc' and 'write_pc' into methodsTankut Baris Aktemur1-2/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's read_pc and write_pc ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. * target.cc (process_target::read_pc): Define. (process_target::write_pc): Define. Update the derived classes and callers below. * regcache.cc (regcache_read_pc): Update. (regcache_write_pc): Update. * linux-low.cc (linux_target_ops): Update. (linux_read_pc): Turn into ... (linux_process_target::read_pc): ... this. (linux_write_pc): Turn into ... (linux_process_target::write_pc): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_tracepoints' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_tracepoints op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_supports_tracepoints): Update the macro. * target.cc (process_target::supports_tracepoints): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_tracepoints): Turn into ... (linux_process_target::supports_tracepoints): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'process_qsupported' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's process_qsupported op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_process_qsupported): Update the macro. * target.cc (process_target::process_qsupported): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_process_qsupported): Turn into ... (linux_process_target::process_qsupported): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'read_loadmap' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's read_loadmap op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. Also add 'supports_read_loadmap'. * target.cc (process_target::read_loadmap): Define. (process_target::supports_read_loadmap): Define. Update the derived classes and callers below. * server.cc (handle_qxfer_fdpic): Update. (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::supports_read_loadmap): Define. (linux_read_loadmap): Turn into ... (linux_process_target::read_loadmap): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'core_of_thread' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's core_of_thread op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_core_of_thread): Update the macro. * target.cc (process_target::core_of_thread): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_process_target::core_of_thread): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'handle_monitor_command' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's handle_monitor_command op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_handle_monitor_command): Update the macro. * target.cc (process_target::handle_monitor_command): Define. Update the derived classes and callers below. * server.cc (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_process_target::handle_monitor_command): Define. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'handle_new_gdb_connection' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's handle_new_gdb_connection op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. (target_handle_new_gdb_connection): Update the macro. * target.cc (process_target::handle_new_gdb_connection): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_handle_new_gdb_connection): Turn into ... (linux_process_target::handle_new_gdb_connection): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target ops 'supports_{fork,vfork,exec}_events' into methodsTankut Baris Aktemur1-3/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_fork_events, supports_vfork_events, and supports_exec_events ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (target_supports_fork_events): Update the macro. (target_supports_vfork_events): Update the macro. (target_supports_exec_events): Update the macro. * target.cc (process_target::supports_fork_events): Define. (process_target::supports_vfork_events): Define. (process_target::supports_exec_events): Define. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_fork_events): Turn into ... (linux_process_target::supports_fork_events): ... this. (linux_supports_vfork_events): Turn into ... (linux_process_target::supports_vfork_events): ... this. (linux_supports_exec_events): Turn into ... (linux_process_target::supports_exec_events): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn target op 'supports_multi_process' into a methodTankut Baris Aktemur1-1/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_multi_process op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. * target.cc (process_target::supports_multi_process): Define. (target_supports_multi_process): Update. Update the derived classes and callers below. * linux-low.cc (linux_target_ops): Update. (linux_supports_multi_process): Turn into ... (linux_process_target::supports_multi_process): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.cc (win32_target_ops): Update.
2020-02-20gdbserver: turn non-stop and async target ops into methodsTankut Baris Aktemur1-3/+0
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's supports_non_stop, async, and start_non_stop ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. (target_supports_non_stop): Update the macro. (target_async): Update the macro. (start_non_stop): Remove declaration. * target.cc (process_target::supports_non_stop): Define. (process_target::async): Define. (process_target::start_non_stop): Define. (start_non_stop): Remove. Update the derived classes and callers below. * server.cc (handle_qxfer_siginfo): Update. (handle_query): Update. * linux-low.cc (linux_target_ops): Update. (linux_supports_non_stop): Turn into ... (linux_process_target::supports_non_stop): ... this. (linux_async): Turn into ... (linux_process_target::async): ... this. (linux_start_non_stop): Turn into ... (linux_process_target::start_non_stop): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. (nto_supports_non_stop): Remove; rely on the default behavior instead. * win32-low.cc (win32_target_ops): Update.