[Bug 44349] New: winedgb: stepping is broken on 32-bit

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 44349] New: winedgb: stepping is broken on 32-bit

Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

            Bug ID: 44349
           Summary: winedgb: stepping is broken on 32-bit
           Product: Wine
           Version: 3.0-rc6
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: winedbg
          Assignee: [hidden email]
          Reporter: [hidden email]
      Distribution: Gentoo

This is actually 3.0-rc6~6 (110eecf7d48688b573f4215f84ff8ad464f40da8) but it
doesn't look like any of those patches touched this.  using stepi on the call
instruction below does not perform the call and instead increments the
instruction pointer by one.

Using gdb 8.0.1 and built with gcc 5.4.0


$ WINEARCH=win64 WINEDEBUG=fixme-all WINEPREFIX=/tmp/daniel/wine/test-debug
/home/daniel/proj/emu/wine/work1/build/debug/32/wine winedbg --gdb
./user32_test.exe.so win
002e:002f: create process
'Z:\home\daniel\proj\emu\wine\work1\build\debug\32\dlls\user32\tests\user32_test.exe'/0x110d68
@0x7ec438e0 (0<0>)
002e:002f: create thread I @0x7ec438e0
GNU gdb (Gentoo 8.0.1 vanilla) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
002e:002f: loads DLL C:\windows\system32\KERNEL32.dll @0x7b410000 (0<0>)
002e:002f: loads DLL C:\windows\system32\ntdll.dll @0x7bc10000 (0<0>)
002e:002f: loads DLL C:\windows\system32\advapi32.dll @0x7e750000 (0<0>)
002e:002f: loads DLL C:\windows\system32\gdi32.dll @0x7e7d0000 (0<0>)
002e:002f: loads DLL C:\windows\system32\version.dll @0x7eff0000 (0<0>)
002e:002f: loads DLL C:\windows\system32\user32.dll @0x7e920000 (0<0>)
002e:002f: loads DLL C:\windows\system32\imm32.dll @0x7e6f0000 (0<0>)
0000002e:0000002f: exception code=0x80000003
No support for verbose packet MustReplyEmpty
No support for verbose packet File:setfs:0
No support for verbose packet File:open:6a7573742070726f62696e67,0,1c0
warning: remote target does not support file transfer, attempting to access
files from local filesystem.
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
0x7b469f66 in DbgBreakPoint () at
/home/daniel/proj/emu/wine/work1/include/winternl.h:2157
2157    static inline void WINAPI DbgBreakPoint(void) { __asm__
__volatile__("int3"); }
trace: 98 => 80
Wine-gdb> break /home/daniel/proj/emu/wine/work1/dlls/user32/tests/win.c:10653
Breakpoint 1 at 0x7ec3b336: file
/home/daniel/proj/emu/wine/work1/dlls/user32/tests/win.c, line 10653.
Wine-gdb> cont
Continuing.
0038:err:win:DefWindowProcW called for other process window 0x4006c

Breakpoint 1, func_win () at
/home/daniel/proj/emu/wine/work1/dlls/user32/tests/win.c:10653
10653       test_enum_thread_windows();
Wine-gdb> display /2i $eip
1: x/2i $eip
=> 0x7ec3b336 <func_win+1396>:  call   0x7ebfc90b <test_enum_thread_windows>
   0x7ec3b33b <func_win+1401>:  call   0x7ec02b25 <test_mdi>
Wine-gdb> stepi
0x7ec3b337      10653       test_enum_thread_windows();
1: x/2i $eip
=> 0x7ec3b337 <func_win+1397>:  rclb   0xe5e8fffc
   0x7ec3b33d <func_win+1403>:  ja     0x7ec3b33b <func_win+1401>


And is you might expect, if I stepi again:

Wine-gdb> stepi

Program received signal SIGSEGV, Segmentation fault.
0x7ec3b337 in func_win () at
/home/daniel/proj/emu/wine/work1/dlls/user32/tests/win.c:10653
10653       test_enum_thread_windows();
1: x/2i $eip
=> 0x7ec3b337 <func_win+1397>:  rclb   0xe5e8fffc
   0x7ec3b33d <func_win+1403>:  ja     0x7ec3b33b <func_win+1401>

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedgb: stepping is broken on 32-bit

Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

--- Comment #1 from Daniel Santos <[hidden email]> ---
I should clarify that the above test is with a 32- & 64-bit build, I haven't
tried on a 32-bit only build and it's fine on 64-bit.

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedgb: stepping is broken on 32-bit

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

--- Comment #2 from Daniel Santos <[hidden email]> ---
Created attachment 60238
  --> https://bugs.winehq.org/attachment.cgi?id=60238
config.log

Also, I built with distcc, so that *could* be the problem.  Ignore
--enable-debug-tools --enable-hybrid-sync as I used a common build script for
testing some other patch sets.

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken on 32-bit using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

Zebediah Figura <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |[hidden email]
             Status|UNCONFIRMED                 |NEW
            Summary|winedgb: stepping is broken |winedbg: stepping is broken
                   |on 32-bit                   |on 32-bit using GDB proxy

--- Comment #3 from Zebediah Figura <[hidden email]> ---
Confirming. I've seen this bug for a while, but never bothered to look into it.

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken on 32-bit using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

--- Comment #4 from Zebediah Figura <[hidden email]> ---
gdb thinks that the breakpoint that we inject is a permanent breakpoint, i.e.
there's actually an int3 in the application's code.

I can't figure out why this doesn't happen on amd64, since I can't (for some
unrelated reason) debug any amd64 application using the gdb proxy.

Can you upload logs of 32- and 64-bit, with `set debug infrun 2` entered before
the `stepi` command?

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken on 32-bit using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

--- Comment #5 from Zebediah Figura <[hidden email]> ---
For some reason 64-bit spontaneously started working again, and I'm seeing the
same problem there as on 32-bit.

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken on 32-bit using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

--- Comment #6 from Daniel Santos <[hidden email]> ---
Created attachment 60260
  --> https://bugs.winehq.org/attachment.cgi?id=60260
winedbg.log

(In reply to Zebediah Figura from comment #4)
> Can you upload logs of 32- and 64-bit, with `set debug infrun 2` entered
> before the `stepi` command?

Here ya go.  So I guess I hadn't tried it on 64-bit because it's happening
there too.

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

Daniel Santos <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|winedbg: stepping is broken |winedbg: stepping is broken
                   |on 32-bit using GDB proxy   |using GDB proxy

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

Daniel Santos <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #60260|0                           |1
        is obsolete|                            |

--- Comment #7 from Daniel Santos <[hidden email]> ---
Created attachment 60261
  --> https://bugs.winehq.org/attachment.cgi?id=60261
winedbg.log

Oops, here's the correct log from 3.0-rc6

--
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.


Reply | Threaded
Open this post in threaded view
|

[Bug 44349] winedbg: stepping is broken using GDB proxy

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=44349

Zebediah Figura <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
      Fixed by SHA1|                            |eb63a5f3c3c1851f212bd14f91d
                   |                            |a329bf3166e42

--- Comment #8 from Zebediah Figura <[hidden email]> ---
This should be fixed as of eb63a5f3c3c1851f212bd14f91da329bf3166e42.

--
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.