summaryrefslogtreecommitdiff
path: root/gdbserver/win32-i386-low.cc
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year range in header of all files managed by GDBJoel Brobecker2023-01-011-1/+1
| | | | | | | This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
* Fix gdbserver build for x86-64 WindowsTom Tromey2022-04-271-10/+10
| | | | | | | | | | | | | I broke the gdbserver build on x86-64 Windows a little while back. Previously, I could not build this configuration, but today I found out that if I configure with: --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 using the Fedora 34 tools, it will in fact build. I'm not certain, but maybe the gnulib update helped with this. This patch fixes the build. I'm checking it in.
* Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker2022-01-011-1/+1
| | | | | | | | This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
* Fix x86_64 mingw buildTom Tromey2021-05-031-1/+1
| | | | | | | | | | | | | | | | | PR build/27807 points out that my recent changes to the Windows port missed a spot in win32-i386-low.cc -- a call to win32_Wow64GetThreadContext remained, causing link errors in gdbserver. This happened because I tested an i686 build, but this code is only used on an x86_64 build. This patch fixes the bug. I am checking it in. gdbserver/ChangeLog 2021-05-03 Tom Tromey <tromey@adacore.com> PR build/27807: * win32-i386-low.cc (i386_get_thread_context): Call Wow64GetThreadContext, not win32_Wow64GetThreadContext.
* Update copyright year range in all GDB filesJoel Brobecker2021-01-011-1/+1
| | | | | | | | | This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
* Enable hardware breakpoints for gdbserver on WindowsHannes Domani2020-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When trying to use hardware breakpoints with gdbserver you get this error: (gdb) hbreak main Hardware assisted breakpoint 2 at 0x40162d: file gdb-9493.c, line 5. (gdb) c Continuing. Warning: Cannot insert hardware breakpoint 2. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints. It turns out the respective types just needed to be added to the appropriate callback functions, because x86_dr_(insert|remove)_watchpoint already handles them. gdbserver/ChangeLog: 2020-05-15 Hannes Domani <ssbssa@yahoo.de> * win32-i386-low.cc (i386_supports_z_point_type): Handle Z_PACKET_HW_BP z_type. (i386_insert_point): Handle raw_bkpt_type type. (i386_remove_point): Likewise.
* Implement debugging of WOW64 processes in gdbserverHannes Domani2020-04-301-33/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Introduce win32_target_ops::decr_pc_after_breakTom Tromey2020-04-081-0/+1
| | | | | | | | | | | | | | | This adds a decr_pc_after_break member to win32_target_ops and updates the two Windows targets to set it. Note that I can't test the win32-arm-low.c change. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New field. * win32-i386-low.c (the_low_target): Update. * win32-arm-low.c (the_low_target): Update.
* Add read_pc / write_pc support to win32-lowTom Tromey2020-04-081-0/+46
| | | | | | | | | | | | | | | | | | | | | | 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.
* Wrap shared windows-nat code in windows_nat namespaceTom Tromey2020-04-081-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".
* Change two windows_thread_info members to "bool"Tom Tromey2020-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | This changes a couple of fields of windows_thread_info to have type "bool". It also updates the comment of another field, to clarify the possible values it can hold. gdb/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * windows-nat.c (thread_rec) (windows_nat_target::fetch_registers): Update. * nat/windows-nat.h (struct windows_thread_info) <suspended>: Update comment. <debug_registers_changed, reload_context>: Now bool. gdbserver/ChangeLog 2020-04-08 Tom Tromey <tromey@adacore.com> * win32-i386-low.c (update_debug_registers) (i386_prepare_to_resume, i386_thread_added): Update.
* Rename win32_thread_info to windows_thread_infoTom Tromey2020-04-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdbserver: rename source files to .ccSimon Marchi2020-02-131-0/+468
For the same reasons outlined in the previous patch, this patch renames gdbserver source files to .cc. I have moved the "-x c++" switch to only those rules that require it. gdbserver/ChangeLog: * Makefile.in: Rename source files from .c to .cc. * %.c: Rename to %.cc. * configure.ac: Rename server.c to server.cc. * configure: Re-generate.