Commit Graph

166 Commits

Author SHA1 Message Date
Rémi Bernon 83284dbad4 winedbg: Support QStartNoAckMode to reduce verbosity.
We don't have to validate and acknowledge the packets as long as this
mode is enabled, this will reduce verbosity especially when tracing.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:28:38 +02:00
Rémi Bernon ec76cb754e winedbg: Cleanup extract_packets for faster acking.
Sometimes multiple packets are received and we were assuming it was
some repeated requests due to slow ack. We can ack packets first.

It was also dropping some perfectly valid packets and we should process
them all. For instance, lldb frontend sometimes send multiple packets
at a the same time and expects them to be handled.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:28:34 +02:00
Rémi Bernon 21c3f183e0 winedbg: Force packet data to be NUL terminated.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:28:32 +02:00
Rémi Bernon 46ec0b956d winedbg: Force read data to be NUL terminated.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 17:28:30 +02:00
Francois Gouget 4dfa8a834d winedbg: Fix the spelling of various messages and the README.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 20:59:19 +01:00
Francois Gouget 9fbfa988f2 winedbg: Avoid unneeded strlen() calls.
Note that target_xml is an array and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Alexandre Julliard a4fbe12f97 winedbg: Remove some redundant length arguments.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 22:42:41 +01:00
Andrew Eikum 52fecef1a2 winedbg: In gdbproxy file, allow wine paths with spaces.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +02:00
Zebediah Figura e525e49976 winedbg/gdbproxy: Silence some noisy debug messages.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-20 09:07:55 +02:00
Zebediah Figura 05e54ac6e6 winedbg: Ignore EXCEPTION_INVALID_HANDLE.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 1dbab1cd0d winedbg/gdbproxy: Simplify packet_verbose().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 00349e3f2a winedbg/gdbproxy: Don't try to single-step a terminated process.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 6159431cd7 winedbg/gdbproxy: Use the WINEDEBUG interface for debugging winedbg.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Michael Stefaniuc 0c8e555e4c winedbg: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-19 20:48:52 +02:00
Zebediah Figura c1adb6ea1c winedbg/gdbproxy: Handle VS thread renaming.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Zebediah Figura 1244759036 winedbg/gdbproxy: Store the register map inside the be_cpu struct.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-14 09:29:12 +02:00
Zebediah Figura cf349cea69 winedbg: Add a backend-specific vector for setting a thread's context.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Zebediah Figura 2326179312 winedbg: Add a backend-specific vector for retrieving a thread's context.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Zebediah Figura 45e0654591 winedbg: Use WOW64_CONTEXT instead of CONTEXT for i386 backend.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Zebediah Figura b459c88caa winedbg/gdbproxy: Remove unnecessary checks for supported context flags.
And simplify the assignment to use CONTEXT_ALL instead. If we don't support
reading from a register then we just ignore its value.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Zebediah Figura 42bbeedbe4 winedbg: Make be_cpu process-specific.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-13 22:13:27 +02:00
Zebediah Figura a602405efd winedbg: Use gdb's default handling of breakpoints.
We're essentially doing the same thing, so there's no reason not to leave
the handling entirely to gdb.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-18 16:33:20 +02:00
Zebediah Figura 3849270aa7 winedbg: Add support for starting on a user-supplied port.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-03 10:36:33 +02:00
Martin Storsjo e0780c258f ntdll: Update the ARM64 CONTEXT struct to match Win SDK 10.0.16299.0.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 13:13:59 +01:00
Henri Verbeet fc3ea7d1ef winedbg: Handle byte-sized registers in cpu_register() and cpu_register_hex_from().
Like for example the recently added floating-point TagWord on AMD64.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 19:38:30 +01:00
Vladimir Bespalov 57ccf8221f winedbg: Fix enum value compilation warning.
Signed-off-by: Vlad Bespalov <vlad.botanic@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 19:38:29 +01:00
Zebediah Figura eb63a5f3c3 winedbg/gdbproxy: Replace memory read over a breakpoint with the real value.
Normally, when we hit a breakpoint, we remove it before stopping and add it
after continuing. gdb, however, reads the process memory before requesting
that the breakpoint be removed, and apparently caches it until the `stepi`
instruction is executed; as a result, it thinks that the interrupt byte that
is present in the code is an actual interrupt and not a breakpoint, and so
tries to step over it as one byte instead of executing the real instruction
at that location.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 12:12:02 +01:00
Zebediah Figura d1e9694eda winedbg/gdbproxy: Add support for floating-point registers on x86 and x86_64.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 12:12:02 +01:00
Alexandre Julliard 21c12ddc64 ntdll: Fix CONTEXT definition for ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:01 +01:00
Alexandre Julliard eb337adcc2 ntdll: Fix CONTEXT definition for ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 13:21:31 +01:00
Gerald Pfeifer cf48fbcf36 winedbg: Extend buffer in packet_query_monitor_process to avoid avoid overrun/truncation.
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-03 11:51:32 +02:00
André Hentschel 3549810faa winedbg: Remove dead variable (Clang). 2015-07-22 07:24:21 +02:00
André Hentschel bd1f7ef186 include: Rename 64-bit PState to 32-bit Cpsr on ARM64. 2015-06-15 14:51:33 +09:00
André Hentschel 8e0164bd26 include: Add more ARM64 CV constants. 2015-05-28 14:20:55 +09:00
André Hentschel 613d1715a4 winedbg: Respect TMPDIR environment variable. 2014-09-17 10:18:56 +02:00
Frédéric Delanoy 57d7f74d34 Assorted spelling fixes. 2013-11-21 19:44:46 +01:00
Akihiro Sagawa f649ee5997 winedbg: Add x87 register support in gdb proxy. 2013-05-08 14:30:51 +02:00
Akihiro Sagawa e06fd8d003 winedbg: Improve the register conversion to support over 64-bit registers. 2013-05-08 14:30:45 +02:00
Akihiro Sagawa b2de0880ec winedbg: Verify context flags before reading or writing registers. 2013-05-08 14:30:11 +02:00
André Hentschel 40e7f7b787 winedbg: Remove SPARC support. 2013-03-11 10:49:14 +01:00
Alexandre Julliard 51947acd5a winedbg: Use socklen_t where appropriate. 2013-03-06 14:09:53 +01:00
André Hentschel 2d449b76e1 winedbg: Add support for XML Target Descriptions to read Cpsr on ARM. 2013-02-26 11:27:27 +01:00
André Hentschel dd8ec9994b winedbg: Add PState to cpu_register_map for ARM64. 2013-02-13 10:19:32 +01:00
André Hentschel d62d7474d4 winedbg: Add ARM64 support. 2013-01-16 12:53:42 +01:00
André Hentschel addd324dba winedbg: Cleanup if gdb startup fails (coverity). 2012-10-26 11:49:06 +02:00
André Hentschel 72836c0b7e winedbg: Fix check for register number (coverity). 2012-10-23 12:25:22 +02:00
Michael Stefaniuc 442b34415a winedbg: Simplify the "pointer to start of array" idiom. 2012-07-27 17:05:30 +02:00
Eric Pouech e9eab7bbfc winedbg: In the gdb remote protocol implementation, correctly manage the size of registers on the wire (esp. for 64bit ones). 2012-05-23 17:40:57 +02:00
Eric Pouech 8308c35ec5 winedbg: In the gdb remote protocol implementation, correctly manage the size of registers on the wire (esp. for 64bit ones). 2012-05-21 11:34:17 +02:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Eric Pouech b4cea6e402 winedbg: Added support for qAttached query packet. 2012-01-04 18:58:44 +01:00
Eric Pouech a971d8657c winedbg: Don't assert() on unsupported v-packets, but rather report an error. 2011-10-05 17:09:40 -05:00
André Hentschel 18aaad2063 winedbg: Remove Alpha support. 2011-04-20 13:11:18 +02:00
André Hentschel be729282ce winedbg: Add more ARM registers to the map. 2011-04-18 12:30:14 +02:00
André Hentschel 09e6a41435 winedbg: Add ARM support. 2010-09-20 12:59:14 +02:00
Paul Bolle f942cb33ab winedbg: gdbproxy: Quietly handle qSupported and qTStatus. 2010-08-31 14:23:49 +02:00
Paul Bolle da16ade1d0 winedbg: gdb proxy mode: hide printf unless traced. 2010-08-30 17:56:16 +02:00
Paul Bolle 2855fac645 winedbg: gdb proxy mode: allow interrupt from command line.
Ignore SIGINT (in gdb_startup) so an interrupt from the command line
will break the debuggee and bring up the gdb prompt (instead of killing
both winedbg and the debuggee).
2010-08-30 17:56:08 +02:00
Austin English 06c9afbb55 winedbg: Initial Sparc support. 2010-08-26 12:43:39 +02:00
Eric Pouech e4c29f9087 winedbg: Use standard Wine lists for threads. 2010-04-13 11:43:09 +02:00
André Hentschel 76c518539f winedbg: Update link. 2010-01-06 09:52:44 +01:00
Eric Pouech ab2e0bdef6 winedbg: Added a couple of tweaks to properly support 32bit vs 64bit wide addresses. 2009-12-14 12:30:33 +01:00
Eric Pouech 97d44dd399 dbghelp: Force 64bit module enumeration on all platforms. 2009-12-14 12:29:43 +01:00
Alexandre Julliard ec73f0b71a winedbg: Fix a number of 64-bit pointer truncation issues. 2009-12-10 15:23:45 +01:00
Alexandre Julliard c09ac7a41f winedbg: Use the explicit name for all A/W function. 2009-12-09 18:14:07 +01:00
Eric Pouech a116f78ded winedbg: In proxy mode, correctly init the wine_segs fields. 2009-11-09 20:02:20 +01:00
Alexandre Julliard 8d0cb61bc7 winedbg: Add wrappers for Read/WriteProcessMemory to fix the mingw build. 2009-06-05 15:19:58 +02:00
Francois Gouget 84cd15a021 winedbg: Replace realloc() with HeapReAlloc(). 2009-05-15 10:31:12 +02:00
Eric Pouech cbb84fdb73 winedbg: Added a command to allow loading mismatched modules. 2008-10-20 13:53:08 +02:00
Eric Pouech 5c8ad49158 winedbg: Use Unicode strings for all module references. 2008-10-20 13:52:44 +02:00
Eric Pouech 6986975816 winedbg: Search default debuggee dir for symbol information. 2008-09-04 13:47:48 +02:00
Alexandre Julliard 2e83ea49be winedbg: Fix compile when poll() is not available. 2008-05-26 19:25:04 +02:00
Eric Pouech 5d90e60ed5 winedbg: Added implementation of qSupported request. 2008-05-01 11:12:24 +02:00
Alexandre Julliard a8b0a5ea91 winedbg: Avoid using size_t in an error message. 2008-02-18 14:10:03 +01:00
Eric Pouech 336c000d4e winedbg: Implemented the pXX request in gdb proxy. 2008-02-04 14:18:59 +01:00
Michael Stefaniuc 9a522589fb programs: Remove unreachable break after return/break. Found by Smatch. 2007-07-19 11:57:53 +02:00
Alexandre Julliard 6744929428 winedbg: Win64 printf format fixes. 2006-12-20 14:57:08 +01:00
Alexandre Julliard 2bc33389e8 winedbg: Fixed a few data types. 2006-12-20 14:57:08 +01:00
Eric Pouech 9e9f8af552 winedbg: Correctly protect system inclusion (needed for Mingw compilation). 2006-08-15 11:42:16 +02:00
Ge van Geldorp f0279726eb winedbg: Adjust the parameters of the backend read/write routines to
match those of ReadProcessMemory/WriteProcessMemory, since those are
the ones actually used.
2006-07-03 11:37:29 +02:00
Ge van Geldorp e08a176007 winedbg: Added x86_64 support. 2006-06-20 11:06:31 +02:00
Alexandre Julliard 68090e5d68 winedbg: sscanf arguments should be ints, not size_t. 2006-06-13 14:16:06 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Eric Pouech c918e80ed2 winedbg: process_io
- added ability to specify process_io at process creation/attachment
  time
- created a process_io structure for gdbproxy
2006-03-02 11:48:43 +01:00
Eric Pouech 22ff946409 winedbg: Fixed regression in gdb handling. 2006-02-28 12:05:06 +01:00
Eric Pouech a67f8e862e winedbg: Move gdb command line handling.
- moves gdb command line handling to gdbproxy.c
- using manifest constants to make code more readable
2006-02-27 14:22:21 +01:00
Ge van Geldorp 1a1583a364 Match PSDK STATUS_* definitions. 2005-11-28 17:32:54 +01:00
Francois Gouget 6d442aeb34 Assorted spelling fixes. 2005-11-23 20:14:43 +01:00
Alexandre Julliard e4b2a0bbbc Use Get/SetWindowLongPtr instead of Get/SetWindowLong where
appropriate.
2005-09-09 15:20:04 +00:00
Mike McCormack 516a577df1 Fix gcc 4.0 warnings. 2005-08-19 10:04:03 +00:00
Eric Pouech 73ea238f46 Reindented parts to be conform to the rest of the code. 2005-05-29 20:04:28 +00:00
Eric Pouech d6be549a76 - started infrastructure for proper multi-target support (active
process, minidump...)
- all read/write memory ops are now done thru a centralized process_io
  facility
- minor fixes & cleanups in CPU backends
2005-05-24 11:46:25 +00:00
David Welch ccafccebf0 Added the ability to break into the program when using the gdb proxy. 2005-05-24 10:11:37 +00:00
David Welch 8fa319264d Fix decoding of thread IDs in the gdbproxy. 2005-05-24 09:49:56 +00:00
Oliver Stieber e8007cc0ef Added vCont support. 2005-02-10 21:18:12 +00:00
Vincent Béron 2c1b35dd17 Add some more Alpha asm code and Alpha-specific parts. 2004-10-18 21:27:52 +00:00
Eric Pouech 926f66186f - fixed breakpoint enabled/disabled state management
- fixed recursion in type printing
- now all type-id are stored with the base address of the module which
  defines the type (struct dbg_type takes care of this pairing)
- fixed a couple of bugs in display handling
- fixed strings print and examination
2004-08-22 22:35:36 +00:00
Marcus Meissner fac7405531 Replaced undefined C expression. 2004-08-02 18:25:58 +00:00
Eric Pouech deca2502d6 - all symbol information storage is now module relative, so we can
unload a module (and it's debugging information), and a process
  without pain
- portabiblity to another CPU should be easier now (CPU dependent backend)
- speed up memory allocation
- stabs related fixes:
      + now correctly handling symbol's size
      + blocks {} in functions are now correctly recognized and stored
        (also applies to local variables scoping)
      + better basic types management (less wild guesses in the code)
      + full support of inline functions (source stepping now shows the
        code in .h files for example)
- removal of external debugger (attaching with gdb is just fine to
  debug winedbg)
- fixed a couple of issues for symbol address handling (address
  lookup, incorrect type binding)
- winedbg now has a man page
2004-06-04 00:59:16 +00:00
Eric Pouech 62bf6ecc85 - now detecting Dwarf debug information in ELF modules (but don't load
it)
- separated module management (pe.c, elf.c) from debug information
  management (stabs.c, msc.c)
- worked around new wine-pthread and wine-kthread loaders (no longer
  use "wine" as default loader)
- better convergence of gdb-proxy and winedbg for ELF handling
- fixed ELF link-map walking - now using all loaded shared libs -
  (with the help of Robert Shearman)
- added a bit of const correctness
2004-02-03 00:14:12 +00:00