Hui added inline comments.

================
Comment at: 
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py:208-212
+    # In current implementation of llgs on Windows, as a response to '\x03' 
packet, the debugger
+    # of the native process will trigger a call to DebugBreakProcess that will 
create a new thread
+    # to handle the exception debug event. So one more stop thread will be 
notified to the
+    # delegate, e.g. llgs.  So tests below to assert the stop threads number 
will all fail.
+    @expectedFailureAll(oslist=["windows"])
----------------
labath wrote:
> labath wrote:
> > Is this something that we consider to be a bug, or is it just how debugging 
> > is supposed to work on windows? If it's a bug then fine, but if not then we 
> > might consider adjusting the expectations in the test (or just skipping it).
> You marked this as done, but it's not obvious how is this comment resolved 
> (or indeed, if it needs to be resolved). Can you elaborate?
DebugBreakProcess is supposed to spawn a new thread in the debugged process and 
then the thread exits after the irq is handled.

See below thread #1 is main thread of the debugged process and thread #2 is the 
newly spawned.
json string contains two stopped threads information.

looks like the stopped threads number is supposed to +1, but in order to be 
consistent with Visual Studio,
it shall be possible to only report the thread #1 stop info.

To modify the python script for Windows is at some cost. Maybe just skip them?

```
(lldb) process interrupt
 GDBRemoteClientBase::Lock::Lock sent packet: \x03
...
 <  16> send packet: $jThreadsInfo#c1
 < 354> read packet: 
$[{"name":"main.exe","reason":"trace","registers":{"16":"dc6b5a9af77f0000","6":"0000000000000000","7":"80fa1e8aca000000"}],"tid":23108}],{"description":"Exception
 0x80000003 encountered at address 
0x7ffa1701e370","name":"main.exe","reason":"exception","registers":{"16":"71e30117fa7f0000","6":"0000000000000000","7":"28fa4f8aca000000"}],"tid":23716}]]#f0

Process 27544 stopped
* thread #1, name = 'main.exe', stop reason = trace
    frame #0: 0x00007ff79a5a6bdc main.exe`main at main.cpp:7
   4    {
   5
   6      printf("abc");
-> 7      while(1);
   8      return 1;
   9    }
  thread #2, name = 'main.exe', stop reason = Exception 0x80000003 encountered 
at address 0x7ffa1701e370
    frame #0: 0x00007ffa1701e371
->  0x7ffa1701e371: retq
    0x7ffa1701e372: int3
    0x7ffa1701e373: int3
    0x7ffa1701e374: int3
```



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61687/new/

https://reviews.llvm.org/D61687



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to