[Bug 48861] x64dbg fails to set debuggee command line via File -> Change Command Line menu
WineHQ Bugzilla
wine-bugs at winehq.org
Thu Oct 15 12:37:58 CDT 2020
https://bugs.winehq.org/show_bug.cgi?id=48861
--- Comment #3 from Anastasius Focht <focht at gmx.net> ---
Hello folks,
the situation has improved with recent changes. As already mentioned in my
comment #0 it still doesn't work in all cases (compilers and optimization
strategies).
*
https://source.winehq.org/git/wine.git/commitdiff/d01d3b749d7d99c75f29396fd79fab735ced2b2d
("kernelbase: Use command_lineW for GetCommandLineW.")
*
https://source.winehq.org/git/wine.git/commitdiff/8a1933bbe40b67d22d919861deed9a7a68684433
("kernelbase: Remove DECLSPEC_HOTPATCH for GetCommandLine[AW].")
Thanks Myah
===
GCC 10.2 (Fedora 32):
32-bit works (-gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2)
--- snip --
$ gdb mainline-install-x86_64/lib/wine/kernelbase.dll.so -batch -ex
'disassemble GetCommandLineA'
Dump of assembler code for function GetCommandLineA:
0x7b070ff0 <+0>: mov 0x7b0f3708,%eax
0x7b070ff5 <+5>: ret
$ gdb mainline-install-x86_64/lib/wine/kernelbase.dll.so -batch -ex
'disassemble GetCommandLineW'
Dump of assembler code for function GetCommandLineW:
0x7b071000 <+0>: mov 0x7b0f3704,%eax
0x7b071005 <+5>: ret
--- snip --
64-bit doesn't work (-gdwarf-2 -gstrict-dwarf -g -O2)
It generates standard function prologue with frame pointer.
--- snip ---
$ gdb mainline-install-x86_64/lib64/wine/kernelbase.dll.so -batch -ex
'disassemble GetCommandLineA'
Dump of assembler code for function GetCommandLineA:
0x000000007b06e520 <+0>: push %rbp
0x000000007b06e521 <+1>: mov 0x80f68(%rip),%rax # 0x7b0ef490
<command_lineA>
0x000000007b06e528 <+8>: mov %rsp,%rbp
0x000000007b06e52b <+11>: and $0xfffffffffffffff0,%rsp
0x000000007b06e52f <+15>: leaveq
0x000000007b06e530 <+16>: retq
$ gdb mainline-install-x86_64/lib64/wine/kernelbase.dll.so -batch -ex
'disassemble GetCommandLineW'
Dump of assembler code for function GetCommandLineW:
0x000000007b06e540 <+0>: push %rbp
0x000000007b06e541 <+1>: mov 0x80f40(%rip),%rax # 0x7b0ef488
<command_lineW>
0x000000007b06e548 <+8>: mov %rsp,%rbp
0x000000007b06e54b <+11>: and $0xfffffffffffffff0,%rsp
0x000000007b06e54f <+15>: leaveq
0x000000007b06e550 <+16>: retq
--- snip ---
===
LLVM MinGW 10.x (PE)
32-bit doesn't work (-fno-omit-frame-pointer -gcodeview -g -O2)
It generates standard function prologue with frame pointer, even though there
is no stack usage at all.
--- snip ---
$ gdb mainline-install-x86_64/lib/wine/kernelbase.dll -batch -ex 'disassemble
GetCommandLineW'
Dump of assembler code for function kernelbase!GetCommandLineW:
0x7b037830 <+0>: push %ebp
0x7b037831 <+1>: mov %esp,%ebp
0x7b037833 <+3>: mov 0x7b082de0,%eax
0x7b037838 <+8>: pop %ebp
0x7b037839 <+9>: ret
$ gdb mainline-install-x86_64/lib/wine/kernelbase.dll -batch -ex 'disassemble
GetCommandLineA'
Dump of assembler code for function kernelbase!GetCommandLineA:
0x7b037820 <+0>: push %ebp
0x7b037821 <+1>: mov %esp,%ebp
0x7b037823 <+3>: mov 0x7b082de4,%eax
0x7b037828 <+8>: pop %ebp
0x7b037829 <+9>: ret
--- snip ---
64-bit works (-gcodeview -g -O2)
--- snip ---
$ gdb mainline-install-x86_64/lib64/wine/kernelbase.dll -batch -ex 'disassemble
GetCommandLineA'
Dump of assembler code for function kernelbase!GetCommandLineA:
0x000000007b040940 <+0>: mov 0x550d9(%rip),%rax # 0x7b095a20
0x000000007b040947 <+7>: retq
0x000000007b040948 <+8>: nopl 0x0(%rax,%rax,1)
$ gdb mainline-install-x86_64/lib64/wine/kernelbase.dll -batch -ex 'disassemble
GetCommandLineW'
Dump of assembler code for function kernelbase!GetCommandLineW:
0x000000007b040950 <+0>: mov 0x550c1(%rip),%rax # 0x7b095a18
0x000000007b040957 <+7>: retq
0x000000007b040958 <+8>: nopl 0x0(%rax,%rax,1)
--- snip ---
$ wine --version
wine-5.19-123-ge909986e6ea
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list