VirtualBox

Changeset 92245 in vbox for trunk


Ignore:
Timestamp:
Nov 5, 2021 11:40:02 PM (3 years ago)
Author:
vboxsync
Message:

IPRT/rtR3WinUnhandledXcptFilter: Log the PID and command line too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/init-win.cpp

    r91605 r92245  
    4343#include <iprt/log.h>
    4444#include <iprt/param.h>
     45#include <iprt/process.h>
    4546#include <iprt/string.h>
    4647#include <iprt/thread.h>
     
    574575    if (pLogger)
    575576    {
    576         RTLogLogger(pLogger, NULL, "\n!!! rtR3WinUnhandledXcptFilter caught an exception on thread %p!!!\n", RTThreadNativeSelf());
     577        RTLogLogger(pLogger, NULL, "\n!!! rtR3WinUnhandledXcptFilter caught an exception on thread %p in %u !!!\n",
     578                    RTThreadNativeSelf(), RTProcSelf());
    577579
    578580        /*
     
    800802                }
    801803            }
     804
     805            /*
     806             * Dump the command line if we have one. We do this last in case it crashes.
     807             */
     808            PRTL_USER_PROCESS_PARAMETERS pProcParams = pPeb->ProcessParameters;
     809            if (RT_VALID_PTR(pProcParams))
     810            {
     811                if (RT_VALID_PTR(pProcParams->CommandLine.Buffer)
     812                    && pProcParams->CommandLine.Length > 0
     813                    && pProcParams->CommandLine.Length <= pProcParams->CommandLine.MaximumLength
     814                    && !(pProcParams->CommandLine.Length & 1)
     815                    && !(pProcParams->CommandLine.MaximumLength & 1))
     816                    RTLogLogger(pLogger, NULL, "PEB/CommandLine: %.*ls\n",
     817                                pProcParams->CommandLine.Length / sizeof(RTUTF16), pProcParams->CommandLine.Buffer);
     818            }
    802819        }
    803820    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette