none
How to debug a 32 bit application on windows 7 64 Bit RRS feed

  • Question

  • Hi All

    I need some help on the correct way to debug a VS 2010 32 Bit application running on Windows 7 x64

    1. Do I use the 32 or 64 bit versions of windbg and adplus

    i.e adplus to create the hang dump file and windbg to analyze the dump file

    I am currently using the 64 bit version of windbg and adplus and have generated a dump file using adplus when the application hung

    I can't get sos to load within windbg hence i can't interperet the dump file to find the reason for the application hang

    Regards

    Steve

    Thursday, October 28, 2010 8:03 AM

All replies

  • You can debug a VS 2010 32 bit application with WinDBG x64 under Windows 7 x64 if you select the 32 bit mode.

    .load wow64exts
    !sw

    Hope that helps.

    Karl

    Thursday, October 28, 2010 12:00 PM
  • Hi Karl

    My windows forms application (32 bit) hangs on Windows 7 x64, mainly when my app is minimised to the taskbar

    I have got windbg working on the hang dump file but am lost as to what it is telling me

    There are 2 managed threads and here are their call stacks

    Can anybody help me interpret this info

    Failing that does anybody know where I can get this interpreted commercially

    0:000:x86> !clrstack
    OS Thread Id: 0x1598 (0)
    ESP       EIP    
    002ae640 0000002b [HelperMethodFrame_1OBJ: 00000000002ae640] System.Threading.WaitHandle.WaitOneNative(Microsoft.Win32.SafeHandles.SafeWaitHandle, UInt32, Boolean, Boolean)
    002ae6ec 6f28685f System.Threading.WaitHandle.WaitOne(Int64, Boolean)
    002ae708 6f286815 System.Threading.WaitHandle.WaitOne(Int32, Boolean)
    002ae71c 609c1a51 System.Windows.Forms.Control.WaitForWaitHandle(System.Threading.WaitHandle)
    002ae734 604a4a20 System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
    002ae7d8 609c33d0 System.Windows.Forms.Control.Invoke(System.Delegate, System.Object[])
    002ae80c 60bf0ca7 System.Windows.Forms.WindowsFormsSynchronizationContext.Send(System.Threading.SendOrPostCallback, System.Object)
    002ae824 6eddf476 Microsoft.Win32.SystemEvents+SystemEventInvokeInfo.Invoke(Boolean, System.Object[])
    002ae858 6edde5ff Microsoft.Win32.SystemEvents.RaiseEvent(Boolean, System.Object, System.Object[])
    002ae8a4 6edde453 Microsoft.Win32.SystemEvents.OnUserPreferenceChanged(Int32, IntPtr, IntPtr)
    002ae8c4 6ef5103c Microsoft.Win32.SystemEvents.WindowProc(IntPtr, Int32, IntPtr, IntPtr)
    002ae8c8 003509e4 [InlinedCallFrame: 00000000002ae8c8]
    002aea9c 604a8aee System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)
    002aeb38 604a8757 System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
    002aeb8c 604a85a1 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
    002aebbc 609bddd8 System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext)
    002aebc8 71b528f1 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
    002aebf4 71b52f5f Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
    002aec20 71b51c20 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
    002aec7c 003a00c5 Haircutz.My.MyApplication.Main(System.String[])
    002aeec8 732d1b5c [GCFrame: 00000000002aeec8]


    OS Thread Id: 0x924 (8)
    ESP       EIP    
    096ceab8 77a400fd [HelperMethodFrame_1OBJ: 00000000096ceab8] System.Threading.WaitHandle.WaitOneNative(Microsoft.Win32.SafeHandles.SafeWaitHandle, UInt32, Boolean, Boolean)
    096ceb64 6f28685f System.Threading.WaitHandle.WaitOne(Int64, Boolean)
    096ceb80 6f286815 System.Threading.WaitHandle.WaitOne(Int32, Boolean)
    096ceb94 6f2867dd System.Threading.WaitHandle.WaitOne()
    096ceb9c 5f3ec723 System.Management.MTAHelper.WorkerThread()
    096cebcc 6f2a6df6 System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
    096cebd8 6f2c5731 System.Threading.ExecutionContext.runTryCode(System.Object)
    096cf008 732d1b5c [HelperMethodFrame_PROTECTOBJ: 00000000096cf008] System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
    096cf070 6f2c5627 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    096cf08c 6f2b0255 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    096cf0a4 6f2a6d74 System.Threading.ThreadHelper.ThreadStart()
    096cf2cc 732d1b5c [GCFrame: 00000000096cf2cc]

    Regards

    Steve

    Friday, October 29, 2010 1:33 AM