Commit Graph

8716 Commits

Author SHA1 Message Date
Eric Pouech 4a206a7ecb winedbg: In gdb proxy mode, ignore ctrl-c.
Let gdb handle the control-c instead of killing winedbg.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51766
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 18:56:20 +01:00
Eric Pouech ff7ff4d0b4 start: Ignore Ctrl-C and let the child decides what to do with it.
Based on a patch from Bernhard Übelacker

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51766
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 18:56:06 +01:00
Alexandre Julliard 2e56906008 winebrowser: Try xdg-open before /usr/bin/open.
/usr/bin/open may be something different on Linux.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52206
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 21:28:58 +01:00
Jacek Caban 288093229d conhost: Remove unused extra_size argument from set_output_info.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 20:55:35 +01:00
Hugh McMaster 12cf3459b5 conhost: Process Ctrl-M key input.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50526
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 20:53:42 +01:00
Chilung Chan e3124a26f2 xcopy: Add /k in Syntax message of STRING_HELP string.
Signed-off-by: Chilung Chan <eason066@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 20:52:23 +01:00
Eric Pouech c03d651b48 winedbg: Move module scoping to the lexer.
This allows expressing module scoping with wildcard characters
(eg kernel*!CreateFileA).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 61a2e527fc winedbg: Move C++ identifier detection to the lexer.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 05c5a12f87 winedbg: Implement proper assignements of floating point numbers.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 5f9d09f4bd winedbg: Remove fetch_float() method from CPU backends.
As they're all the same.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 0ed8cac2cd winedbg: Correctly store integers into a bitfield.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 860de95630 winedbg: Add helper to transfer memory between lvalues.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech c4548c04eb winedbg: Add helper to compare types and use it to detect wrong assigments.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Eric Pouech 0a16dbc730 winedbg: Move bitfield extraction to extract_lgint.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Eric Pouech 10eba8784f winedbg: Add bitfield capability to dbg_lvalue.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Eric Pouech ef3fca0c33 winedbg: Revamp dbg_lvalue structure and add helpers for init.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Eric Pouech 0888943e72 winedbg: Rename print_longlong into print_sdecimal (to mimic print_hex).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Eric Pouech bbfbd7ac05 winedbg: Use dbg_lgint_t as parameter in type_print_hex.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Eric Pouech 9b8d043cc8 winedbg: Renamed extract_longlong() into extract_lgint() for clarity.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:32:27 +01:00
Eric Pouech e656c29e59 winedbg: Remove methods for fetching/storing integers in CPU backends.
All integer code assume CPU of debuggee encode integers:
- little endian
- 2 complement for signed integers.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:32:14 +01:00
Eric Pouech 53ae7824b6 winedbg: Introduce dbg_lg(u)int_t and migrate all integral computations on this type.
As a side effect, the internal 'long int' type is now always 8 byte wide.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:32:05 +01:00
Eric Pouech ac3ee768c3 winedbg: Make pid and tid internal variables DWORDs.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:31:45 +01:00
Eric Pouech 396880ac81 winedbg: Make savable variables size a DWORD.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:31:36 +01:00
Eric Pouech 77f84fd4d5 winedbg: Don't pretend that all dbg_internal_var instances will hold DWORD_PTR.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:31:28 +01:00
Eric Pouech 24eb754af6 winedbg: In print_hex, don't print bits not included in size.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:55 +01:00
Eric Pouech d81e757075 winedbg: Use %ls to print wide character strings.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:55 +01:00
Eric Pouech 8dec81fb6f winedbg: Fixed missing test.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:55 +01:00
Eric Pouech 0c474b9fc2 winedbg: When enumerating symbols, only search for locals when name doesn't refer to a module.
Fixed listing twice the same symbol in some commands like 'break foo!bar'.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 4448ef5031 winedbg: Support 'run' command with arguments to restart current debuggee.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech d331d9cb93 winedbg: Properly handle escaped characters inside strings.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 94ca4be2a6 winedbg: Properly escape debuggee arguments.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 44f49d75ec winedbg: Don't repeat last command (from empty input) when parsing a file.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 956a978801 winedbg: Move lex buffers inside struct parser_context.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 5ffd0d05a8 winedbg: Move YY_INPUT implementation to dbg.y.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 5a94f20065 winedbg: Display line number of syntax errors when reading a command file.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech dd59222d4d winedbg: Support # as comment delimiter in commands.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 9061634a01 winedbg: Be more strict when detecting a string from an array.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Eric Pouech 6cee83a665 winedbg: Protect fetch_float() in CPU backends against buffer overflow.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:55 +01:00
Eric Pouech 0ed49fabc3 winedbg: Protect against incorrect integer size in be_cpu.fetch_integer() method.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:55 +01:00
Eric Pouech c8006d07eb winedbg: Use debuggee pointer size when extracting typed value.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:55 +01:00
Eric Pouech 16fb9640d7 winedbg: Get size of underlying integral types in enums.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:55 +01:00
Eric Pouech 5b54dac338 winedbg: Use macros when manipulating variants.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:55 +01:00
Eric Pouech 07502a0646 winedbg: Replace wine_dbgstr_longlong with I64 width modifier.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:54 +01:00
Eric Pouech a29a8a317a winedbg: Print 'module+disp' instead of 'func+disp' when the address is after the function.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:54 +01:00
Eric Pouech d65edd04cc winedbg: Use I width modifier for DWORD_PTR printf's args.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:54 +01:00
Eric Pouech 14781c7183 winedbg: Use wide-char string literals.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-26 22:08:54 +01:00
Hugh McMaster 015dacccd4 chcp: Add a help string.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:57:42 +01:00
Hugh McMaster ec2f579c71 chcp: Print the active code page after successfully setting the new one.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:56:35 +01:00
Hugh McMaster 97950e014a chcp: Add internationalization support.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:56:16 +01:00
Jinoh Kang ebc60f64e1 winedbg: Implement GDB qXfer object exec-file.
Today, when gdbproxy is started with --no-start mode, GDB fails to
recognise the symbol file unless the `file` command or the
`sharedlibrary` command is explicitly issued.

Also, RHEL's downstream GDB complains with the following message:

  Remote gdbserver does not support determining executable automatically.
  RHEL <=6.8 and <=7.2 versions of gdbserver do not support such automatic executable detection.
  The following versions of gdbserver support it:
  - Upstream version of gdbserver (unsupported) 7.10 or later
  - Red Hat Developer Toolset (DTS) version of gdbserver from DTS 4.0 or later (only on x86_64)
  - RHEL-7.3 versions of gdbserver (on any architecture)

Fix this by implementing the qXfer object "exec-file".

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-23 21:02:13 +01:00