[llvm] [dexter] Correctly identify stop-reason while driving VisualStudio (PR #94754)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 06:24:17 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r 5ae5774fb0b5cac11af479b0905dfdd5255b4047...bbb546a4fd6b31c8dbe4d273e5438d565e36259b cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
``````````

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- VisualStudio.py	2024-06-07 13:16:10.000000 +0000
+++ VisualStudio.py	2024-06-07 13:23:52.217000 +0000
@@ -307,19 +307,19 @@
                 )
             )
 
     def _translate_stop_reason(self, reason):
         # https://learn.microsoft.com/en-us/dotnet/api/envdte.dbgeventreason?view=visualstudiosdk-2022
-        if reason == 1: # dbgEventReasonNone
+        if reason == 1:  # dbgEventReasonNone
             return None
-        if reason == 9: # dbgEventReasonBreakpoint
+        if reason == 9:  # dbgEventReasonBreakpoint
             return StopReason.BREAKPOINT
-        if reason == 8: # dbgEventReasonStep
+        if reason == 8:  # dbgEventReasonStep
             return StopReason.STEP
-        if reason == 6: # dbgEventReasonEndProgram
+        if reason == 6:  # dbgEventReasonEndProgram
             return StopReason.PROGRAM_EXIT
-        if reason == 11: # dbgEventReasonExceptionNotHandled
+        if reason == 11:  # dbgEventReasonExceptionNotHandled
             return StopReason.ERROR
         # Others:
         # dbgEventReasonNone = 1
         # dbgEventReasonGo = 2
         # dbgEventReasonAttachProgram = 3

``````````

</details>


https://github.com/llvm/llvm-project/pull/94754


More information about the llvm-commits mailing list