- support 8 byte targets
- default to CPU pointer size if size isn't present nor supported.
- detect unaligned requests
Signed-off-by: Eric Pouech <eric.pouech@codeweavers.com>
This also correctly initialize some lvalue.
Context of the bug has changed, but the underlying issue remained the same.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39495
Signed-off-by: Eric Pouech <eric.pouech@codeweavers.com>
Currently, dbghelp returns the source file either:
- in DOS format when native module option isn't enabled
- as stored in debug info format otherwise
This used to work for PE modules inside ELF shared libraries but is broken
since evolution to REAL modules. This generates several issues:
- winedbg does not always set the native module option when calling dbghelp
for source file related functions, leading to heterogenous output to user
- some dbghelp function rely on matching source paths, hence leading to
errors in winedbg when mixing the two formats for the same source file.
Introduce a new Wine only dbghelp option to return the source paths as they
are stored inside debug information format, and activate it unconditionaly
inside winedbg.
This fixes some failure cases of command 'break <NN>' in winedbg.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
Note: it's anyway wrong to search source files inside modules' path
(a proper fix will require revisiting source file handling).
This fix will actually be sufficient when running wine from within
its build tree.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
- filter out native machine on wow64 configuration.
- add option to info share to print all modules.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
No longer relying on loaded module info (getting index address out of
PE image, and caching it in struct dbg_module).
Co-authored-by: Evan Tang <etang@codeweavers.com>
Also fixes stack dump in crash summary and 'info stack' command.
(We were using debugger's bitness instead).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Expose the real path of a loaded module (potentially read from
WINEDLLDIR or WINEBUILDDIR or overriden load order or ...). This
improves gdb integration by passing the real path to the loaded
modules (instead of the paths in c:\windows\ system subdirectories).
Introduce new Wine only dbghelp's extended option to enable the
feature.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54250
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
In some cases (running from build tree, overriding load order...), the
path to the module from the load DLL debug event isn't the real path
to the loaded module. So pass the handle to loaded module's image from
winedbg to dbghelp (to avoid image lookup).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54250
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Prints 'int a[10]' (instead of 'int[10] a').
Ditto for variables/fields of type function pointer.
And for pure type printing, no longer prints --none-- for
arrays and function pointers.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This ensures that we always have a type as pointer to a known <type>
(either because it exists in <type>'s module, or it's synthetized inside
debugger).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
We used to hide current WineDbg instance when displaying processes' list
(command 'info proc'). This can potentially generate some "dangling"
processes in the hierarchy (related to this WineDbg instance):
- conhost.exe
- start.exe (when launched from unix shell without full path
to winedbg.exe)
Also, print a more comprehensive error message when trying to attach to
itself (now that debugger's PID is more easily available).
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
'print struct foo' will show all fields of structure
'print enum bar' will show all definitions inside of enum (and their value)
'print /d <type>' will show the type size (in bytes)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
- Get rid of struct type_expr_t
- Enable back typecasts (and rewrite the typecast to fit the type parsing scheme)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Detect data model to be used with current debuggee
PE & ELF 32 bit => ILP32
PE 64 bit => LP64
ELF 64 bit => LLP64
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Currently the name is only used by GDB, send the tid there.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(* as width or precision specifier in printf requires an int not a long)
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>