SweepMerge

複数のファイルから気になる部分を抜き出し複数列の散布図にプロットできる CSV のような形式に変換して表示するプログラム。perl でとも思ったけど、調べることが多そうだったので scala にしといた。

/**
 * From multipe verbose gc log files with +UseConcMarkSweepGC and +PrintGCDetails,
 * pick up sweep time entries and converts to csv which can be plotted as
 * scattered graph.  The output contains timestamp and sweep time column(s).
 * The timestamp column is named 'time'.  Sweep time columns are named with
 * corresponding filename.
 */
import scala.io._
import java.io.File

/** Sweep time entry which contans timestamp (in second) and duratin.
    As it does not perform any arythmetic operation, fields are String
    to avoid conversion overhead. */
case class STEnt(ts: String, dur: String)

/** Parsed result for a file.  It contains filename, list of STEnt and slot
    number which determines the column# in output. */
case class SweepSum(path: String, ents: List[STEnt], slot: Int)

/*+ Main class which takes file name(s) as arguments and converts them
    to CSV like format. */
object SweepMerge {
  def main(args: Array[String]) {
    // filter out non-existing files.
    val validPaths = args.toList.collect{ case p if new File(p).exists => p}
    // process vgc files.
    val lss: List[SweepSum] = validPaths.zipWithIndex.map{case(p,i) =>
      SweepSum(p, entsInFile(p), i)
    }
    // print header
    println(("time" :: validPaths).mkString(","))
    // print rows
    lss.foreach { ss =>
      ss.ents.foreach { e =>
        val s = e.ts + "," + ","*ss.slot + e.dur + ","*(validPaths.size-ss.slot-1)
        println(s)
      }
    }
  }
  /** Look for sweep end patten and convert to list of STEnt.
   */
  def entsInFile(path: String): List[STEnt] = {
    println("processing " + path)
    val ptn = """(\d+\.\d+): \[CMS-concurrent-sweep: (\d+\.*\d*)/(\d+\.*\d*).*""".r
    Source.fromFile(path).getLines.collect{
        case ptn(ts,dur,durr) => STEnt(ts,dur)
    }.toList
  }
}

Gdikdx が使えたらなぁ

Windows Graphics Programming Win32 GDI and DirectDraw® から斜め読み

ローカルの WinDbg によるデバッグはユーザー空間のみ可能
リモートではユーザー、カーネルともに可能だがNULLモデムケーブルなどで接続したりすることが必要

カーネルデバッグなら1台で完結するので SoftIce/W とかがよいらしいが、これは Vista 前に Obsolete のようだ。

成り行きで、IsWindowVisible(HWND) でガードされたブロックで SetDIBitsToDevice(...) が呼ばれているのか、動作しているのかといったあたりで悩んでいる。IsWindowVisible() が(関連する親子 window しだいの面もあるが)想定外の値を返しているのは、SetDIBitsToDevice() の延長に何かあるのか...

Gdikdx.dll (GDI kernel mode debugger extension) を "> load gdikdx.dll" としてロードすると使えるコマンドが増えるらしい。これをローカルのプロセスにアタッチした WinDbg で打つとエラー。そもそも load というコマンドがない。.load はあったので、試してみたがモジュールが見つからないというエラーになる。

なかなか魅力的に見えるコマンドが並んでいるのだが...

dumphmgr [-?] GDIオブジェクトのサマリ
dh [-?] object handle ...
dht [-?] object handle GDI handle type..
ddc [...] hdc device context
dpso [...]surfobj SURFACE struct
... ... ...

少し後に内部動作が書かれていたが、やはり GDI 側のリソースはカーネル側にあり、デバッグも host から target のカーネルデータを取得するという形で動作するようだ。

最近流行の仮想化ソフトで複数 windowsインスタンスをあげて remote kernel debug とかできるんだろうか...

WinDbg の module の dll は WDBGEXTS.h のインターフェイスに従えば作れるらしい。

Merdurial fclone

Mercurial の fclone extension は本家の更新が止まって、下記のサイトでメンテナンスされている。だいぶ前からそうだけど、久々に新しいマシンにインストールしようとして少し探したのでメモ。

https://bitbucket.org/pmezard/hgforest-crew/downloads

tip をダウンロードして、その中の forest.py を適当なディレクトリ、下の例では ~/local/lib の下、に配置して ~/.hgrc で extension として指定する。

[extensions]
hgext.forest=~/local/lib/forest.py

~ は Un*x 系の OS でホームディレクトリを指す。.hgrc の中でも使えるようだ。

WinDbg on Win7 64-bit

Checked how dumps look like in WinDbg on Win7 64-bit

Simple Sleep program

compiler: Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

0:000> ~*k

.  0  Id: 126c.99c Suspend: 0 Teb: 00000000`7efdb000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0017e6f8 00000000`74372c87 wow64cpu!CpupSyscallStub+0x9
00000000`0017e700 00000000`743ed07e wow64cpu!Thunk2ArgNSpNSpReloadState+0x21
00000000`0017e7c0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`0017e810 00000000`77aaae27 wow64!Wow64LdrpInitialize+0x429
00000000`0017ed60 00000000`77aa72f8 ntdll!LdrpInitializeProcess+0x1780
00000000`0017f260 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2af20
00000000`0017f2d0 00000000`00000000 ntdll!LdrInitializeThunk+0xe
0:000> lm
start             end                 module name
00000000`00fe0000 00000000`00feb000   sleep      (deferred)             
00000000`74370000 00000000`74378000   wow64cpu   (pdb symbols)          c:\users\yoshi\local\symbols\wow64cpu.pdb\0C40BF760AB248E8BF307671A74FAA3A1\wow64cpu.pdb
00000000`74380000 00000000`743dc000   wow64win   (deferred)             
00000000`743e0000 00000000`7441f000   wow64      (pdb symbols)          c:\users\yoshi\local\symbols\wow64.pdb\2D5F624FDC73449D904F9F04C6DEB16D1\wow64.pdb
00000000`76d60000 00000000`76e60000   kernel32   (deferred)             
00000000`77770000 00000000`777b6000   KERNELBASE   (deferred)             
00000000`77a60000 00000000`77c0c000   ntdll      (pdb symbols)          c:\users\yoshi\local\symbols\ntdll.pdb\30976E0BFBF745EF860899932F2B791F2\ntdll.pdb
00000000`77c40000 00000000`77dc0000   ntdll_77c40000   (deferred)             

IE

Loading Dump File [C:\Users\yoshi\AppData\Local\Temp\iexplore (3).DMP]
User Mini Dump File with Full Memory: Only application data is available

Symbol search path is: SRV*C:\Users\yoshi\local\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows 7 Version 7600 MP (2 procs) Free x64
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Fri Oct 14 13:28:06.000 2011 (UTC + 9:00)
System Uptime: 0 days 2:16:38.483
Process Uptime: 0 days 0:08:51.000
...........................................WARNING: IPHLPAPI overlaps dnsapi
....WARNING: rsaenh overlaps cryptsp

stack trace and modules

wow64cpu!CpupSyscallStub+0x9:
00000000`74372dd9 c3              ret
0:000> ~*k

.  0  Id: 750.1104 Suspend: 0 Teb: 00000000`7efdb000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0018e618 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`0018e620 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`0018e6e0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`0018e730 00000000`77aaae27 wow64!Wow64LdrpInitialize+0x429
00000000`0018ec80 00000000`77aa72f8 ntdll!LdrpInitializeProcess+0x1780
00000000`0018f180 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2af20
00000000`0018f1f0 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   1  Id: 750.c04 Suspend: 0 Teb: 00000000`7efa7000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`00e1ef18 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`00e1ef20 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`00e1efe0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`00e1f030 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`00e1f580 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`00e1f5f0 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   2  Id: 750.12bc Suspend: 0 Teb: 00000000`7efad000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02c5ead8 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`02c5eae0 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`02c5eba0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02c5ebf0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02c5f140 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02c5f1b0 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   3  Id: 750.13dc Suspend: 0 Teb: 00000000`7ef9b000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02fceea8 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`02fceeb0 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`02fcef70 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02fcefc0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02fcf510 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02fcf580 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   4  Id: 750.1374 Suspend: 0 Teb: 00000000`7ef98000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02ecf0a8 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`02ecf0b0 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`02ecf170 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02ecf1c0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02ecf710 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02ecf780 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   5  Id: 750.b7c Suspend: 0 Teb: 00000000`7ef95000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0330f048 00000000`74372bcd wow64cpu!CpupSyscallStub+0x9
00000000`0330f050 00000000`743ed07e wow64cpu!Thunk0ArgReloadState+0x1a
00000000`0330f110 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`0330f160 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`0330f6b0 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`0330f720 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   6  Id: 750.b88 Suspend: 0 Teb: 00000000`7ef92000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`031eebf8 00000000`74372bcd wow64cpu!CpupSyscallStub+0x9
00000000`031eec00 00000000`743ed07e wow64cpu!Thunk0ArgReloadState+0x1a
00000000`031eecc0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`031eed10 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`031ef260 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`031ef2d0 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   7  Id: 750.1290 Suspend: 0 Teb: 00000000`7ef8c000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0399eb08 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`0399eb10 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`0399ebd0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`0399ec20 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`0399f170 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`0399f1e0 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   8  Id: 750.1100 Suspend: 0 Teb: 00000000`7ef83000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`038eefa8 00000000`7437282c wow64cpu!CpupSyscallStub+0x9
00000000`038eefb0 00000000`743ed07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`038ef070 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`038ef0c0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`038ef610 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`038ef680 00000000`00000000 ntdll!LdrInitializeThunk+0xe

   9  Id: 750.d78 Suspend: 0 Teb: 00000000`7ef7a000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`07b3e728 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`07b3e730 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`07b3e780 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`07b3f040 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`07b3f100 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`07b3f150 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`07b3f6a0 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`07b3f710 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  10  Id: 750.680 Suspend: 0 Teb: 00000000`7efa4000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`00fde118 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`00fde120 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`00fde170 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`00fdea30 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`00fdeaf0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`00fdeb40 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`00fdf090 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`00fdf100 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  11  Id: 750.e04 Suspend: 0 Teb: 00000000`7efaa000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`029ee798 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`029ee7a0 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`029ee7f0 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`029ef0b0 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`029ef170 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`029ef1c0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`029ef710 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`029ef780 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  12  Id: 750.f08 Suspend: 0 Teb: 00000000`7efa1000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02a2e738 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`02a2e740 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`02a2e790 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`02a2f050 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`02a2f110 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02a2f160 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02a2f6b0 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02a2f720 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  13  Id: 750.1238 Suspend: 0 Teb: 00000000`7ef9e000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`00f8e158 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`00f8e160 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`00f8e1b0 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`00f8ea70 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`00f8eb30 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`00f8eb80 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`00f8f0d0 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`00f8f140 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  14  Id: 750.db8 Suspend: 0 Teb: 00000000`7ef8f000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02ace5a8 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`02ace5b0 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`02ace600 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`02aceec0 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`02acef80 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02acefd0 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02acf520 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02acf590 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  15  Id: 750.cdc Suspend: 0 Teb: 00000000`7ef89000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0328e238 00000000`7440a2df ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`0328e240 00000000`743ecf87 wow64!whNtWaitForWorkViaWorkerFactory+0x23
00000000`0328e290 00000000`7437276d wow64!Wow64SystemServiceEx+0xd7
00000000`0328eb50 00000000`743ed07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`0328ec10 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`0328ec60 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`0328f1b0 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`0328f220 00000000`00000000 ntdll!LdrInitializeThunk+0xe

  16  Id: 750.13c8 Suspend: 0 Teb: 00000000`7ef86000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02d1f008 00000000`74372c87 wow64cpu!CpupSyscallStub+0x9
00000000`02d1f010 00000000`743ed07e wow64cpu!Thunk2ArgNSpNSpReloadState+0x21
00000000`02d1f0d0 00000000`743ec549 wow64!RunCpuSimulation+0xa
00000000`02d1f120 00000000`77adbd67 wow64!Wow64LdrpInitialize+0x429
00000000`02d1f670 00000000`77a92ace ntdll! ?? ::FNODOBFM::`string'+0x2b064
00000000`02d1f6e0 00000000`00000000 ntdll!LdrInitializeThunk+0xe
0:000> lm
start             end                 module name
00000000`013d0000 00000000`01476000   iexplore   (deferred)             
00000000`10000000 00000000`10022000   KevlarSigs   (deferred)             
00000000`64200000 00000000`6420f000   HIPIS0e011b5   (deferred)             
00000000`65a50000 00000000`65a76000   HIPI       (deferred)             
00000000`6af70000 00000000`6af7d000   HIPQA      (deferred)             
00000000`70d40000 00000000`70f13000   msxml3     (deferred)             
00000000`70e80000 00000000`71a52000   ieframe    (deferred)             
00000000`72de0000 00000000`72f7e000   comctl32   (deferred)             
00000000`72fd0000 00000000`73026000   uxtheme    (deferred)             
00000000`73340000 00000000`733a2000   rasapi32   (deferred)             
00000000`733e0000 00000000`733fc000   rasman     (deferred)             
00000000`73500000 00000000`73511000   rtutils    (deferred)             
00000000`73520000 00000000`73539000   pnrpnsp    (deferred)             
00000000`735b0000 00000000`735c5000   NapiNSP    (deferred)             
00000000`735c0000 00000000`735cb000   winrnr     (deferred)             
00000000`735d0000 00000000`735e5000   nlaapi     (deferred)             
00000000`73660000 00000000`736f2000   sxs        (deferred)             
00000000`73d20000 00000000`73d67000   rsaenh     (deferred)             
00000000`73d60000 00000000`73d77000   cryptsp    (deferred)             
00000000`73d80000 00000000`73dd7000   apphelp    (deferred)             
00000000`73dd0000 00000000`73e23000   FWPUCLNT   (deferred)             
00000000`73e10000 00000000`73e18000   rasadhlp   (deferred)             
00000000`73e20000 00000000`73e27000   wship6     (deferred)             
00000000`73e30000 00000000`73e37000   WSHTCPIP   (deferred)             
00000000`73e40000 00000000`73e94000   mswsock    (deferred)             
00000000`73eb0000 00000000`73ec4000   RpcRtRemote   (deferred)             
00000000`73ef0000 00000000`73f1d000   ntmarta    (deferred)             
00000000`74160000 00000000`7416c000   version    (deferred)             
00000000`74180000 00000000`7418f000   profapi    (deferred)             
00000000`74190000 00000000`74214000   comctl32_74190000   (deferred)             
00000000`74230000 00000000`7423b000   winnsi     (deferred)             
00000000`74240000 00000000`74267000   IPHLPAPI   (deferred)             
00000000`74260000 00000000`742bb000   dnsapi     (deferred)             
00000000`74370000 00000000`74378000   wow64cpu   (pdb symbols)          c:\users\yoshi\local\symbols\wow64cpu.pdb\0C40BF760AB248E8BF307671A74FAA3A1\wow64cpu.pdb
00000000`74380000 00000000`743dc000   wow64win   (deferred)             
00000000`743e0000 00000000`7441f000   wow64      (pdb symbols)          c:\users\yoshi\local\symbols\wow64.pdb\2D5F624FDC73449D904F9F04C6DEB16D1\wow64.pdb
00000000`744f0000 00000000`7461c000   propsys    (deferred)             
00000000`74f30000 00000000`74fdf000   msfeeds    (deferred)             
00000000`74fd0000 00000000`750c2000   dui70      (deferred)             
00000000`75090000 00000000`750d3000   duser      (deferred)             
00000000`750c0000 00000000`7528a000   explorerframe   (deferred)             
00000000`75230000 00000000`7525b000   ieproxy    (deferred)             
00000000`75260000 00000000`75295000   xmllite    (deferred)             
00000000`753d0000 00000000`753fd000   IMJKAPI    (deferred)             
00000000`75400000 00000000`7548a000   IMJPAPI    (deferred)             
00000000`75460000 00000000`7546e000   imecfm     (deferred)             
00000000`75470000 00000000`75515000   IMETIP     (deferred)             
00000000`754d0000 00000000`755b6000   IMJP10K    (deferred)             
00000000`75590000 00000000`755e4000   oleacc     (deferred)             
00000000`755d0000 00000000`75703000   IMJPTIP    (deferred)             
00000000`756d0000 00000000`756e8000   dwmapi     (deferred)             
00000000`75700000 00000000`75707000   msimg32    (deferred)             
00000000`75710000 00000000`7574f000   ieui       (deferred)             
00000000`75740000 00000000`75749000   SensApi    (deferred)             
00000000`75750000 00000000`7578b000   mlang      (deferred)             
00000000`757a0000 00000000`757ac000   CRYPTBASE   (deferred)             
00000000`757b0000 00000000`75810000   sspicli    (deferred)             
00000000`75810000 00000000`75813000   normaliz   (deferred)             
00000000`75820000 00000000`758a3000   clbcatq    (deferred)             
00000000`758b0000 00000000`75aad000   iertutil   (deferred)             
00000000`75ab0000 00000000`75abc000   msasn1     (deferred)             
00000000`75ac0000 00000000`75b50000   gdi32      (deferred)             
00000000`75b50000 00000000`75bf0000   advapi32   (deferred)             
00000000`75bf0000 00000000`75c02000   devobj     (deferred)             
00000000`75c10000 00000000`75dad000   setupapi   (deferred)             
00000000`75db0000 00000000`75ee6000   urlmon     (deferred)             
00000000`75ef0000 00000000`76b39000   shell32    (deferred)             
00000000`76b40000 00000000`76c0c000   msctf      (deferred)             
00000000`76c70000 00000000`76cc7000   shlwapi    (deferred)             
00000000`76cd0000 00000000`76d15000   Wldap32    (deferred)             
00000000`76d20000 00000000`76d26000   nsi        (deferred)             
00000000`76d60000 00000000`76e60000   kernel32   (deferred)             
00000000`76ef0000 00000000`76f25000   ws2_32     (deferred)             
00000000`76f30000 00000000`76f5e000   imm32      (deferred)             
00000000`76f90000 00000000`77085000   wininet    (deferred)             
00000000`77090000 00000000`7712d000   usp10      (deferred)             
00000000`77130000 00000000`771bf000   oleaut32   (deferred)             
00000000`771c0000 00000000`7726c000   msvcrt     (deferred)             
00000000`77270000 00000000`77370000   user32     (deferred)             
00000000`77370000 00000000`7748c000   crypt32    (deferred)             
00000000`77490000 00000000`774b7000   cfgmgr32   (deferred)             
00000000`774c0000 00000000`7761c000   ole32      (deferred)             
00000000`77620000 00000000`77710000   rpcrt4     (deferred)             
00000000`77710000 00000000`7771a000   lpk        (deferred)             
00000000`77720000 00000000`77739000   sechost    (deferred)             
00000000`77770000 00000000`777b6000   KERNELBASE   (deferred)             
00000000`777c0000 00000000`7783b000   comdlg32   (deferred)             
00000000`77a60000 00000000`77c0c000   ntdll      (pdb symbols)          c:\users\yoshi\local\symbols\ntdll.pdb\30976E0BFBF745EF860899932F2B791F2\ntdll.pdb
00000000`77c10000 00000000`77c15000   psapi      (deferred)             
00000000`77c40000 00000000`77dc0000   ntdll_77c40000   (deferred)             

Register context is printed as if it is a 64-bit process...

0:000> r
rax=0000000000418f68 rbx=000000000037e9b4 rcx=000000000037ea48
rdx=0000000000000000 rsi=0000000000000002 rdi=0000000000000000
rip=0000000074372dd9 rsp=000000000018e618 rbp=000000000037ea00
 r8=000000007729028d  r9=000000000037ea54 r10=0000000000000000
r11=0000000000000000 r12=000000007efdb000 r13=000000000018fd20
r14=000000000018e690 r15=0000000074372450
iopl=0         nv up ei pl zr na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
wow64cpu!CpupSyscallStub+0x9:
00000000`74372dd9 c3              ret

A 64-bit process example

Loading Dump File [C:\Users\yoshi\AppData\Local\Temp\windbg.DMP]
User Mini Dump File with Full Memory: Only application data is available

Symbol search path is: SRV*C:\Users\yoshi\local\symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows 7 Version 7600 MP (2 procs) Free x64
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Fri Oct 14 14:24:07.000 2011 (UTC + 9:00)
System Uptime: 0 days 3:12:35.385
Process Uptime: 0 days 0:01:03.000
................................................................
....................................
Loading unloaded module list
.
user32!ZwUserWaitMessage+0xa:
00000000`7797bf5a c3              ret
0:000> ~*k

.  0  Id: 974.1070 Suspend: 0 Teb: 000007ff`fffdc000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`001fd6e8 00000001`3f08b04e user32!ZwUserWaitMessage+0xa
00000000`001fd6f0 00000001`3f0966e6 windbg!wmain+0x2be
00000000`001ff7e0 00000000`7785f33d windbg!_CxxFrameHandler3+0x28a
00000000`001ff820 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`001ff850 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   1  Id: 974.1268 Suspend: 0 Teb: 000007ff`fffae000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`02bffa98 00000000`77a79a07 ntdll!NtWaitForMultipleObjects+0xa
00000000`02bffaa0 00000000`7785f33d ntdll!TppWaiterpThread+0x14d
00000000`02bffd40 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`02bffd70 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   2  Id: 974.1128 Suspend: 0 Teb: 000007ff`fffac000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0533eef8 000007fe`fda713b6 ntdll!NtWaitForMultipleObjects+0xa
00000000`0533ef00 00000000`77862f53 KERNELBASE!WaitForMultipleObjectsEx+0xe8
00000000`0533f000 00000000`7797bc3d kernel32!WaitForMultipleObjectsExImplementation+0xb3
00000000`0533f090 00000000`7797905a user32!RealMsgWaitForMultipleObjectsEx+0x12a
00000000`0533f130 00000000`77978880 user32!MsgWaitForMultipleObjectsEx+0x46
00000000`0533f170 000007fe`fe74301d user32!MsgWaitForMultipleObjects+0x20
00000000`0533f1b0 000007fe`fe7430e0 shell32!CShellTaskScheduler::_TT_MsgWaitForMultipleObjects+0x51
00000000`0533f230 000007fe`fe73fdeb shell32!CShellTaskScheduler::TT_TransitionThreadToRunningOrTerminating+0xac
00000000`0533f2b0 000007fe`fe73e3ca shell32!CShellTaskThread::ThreadProc+0x257
00000000`0533f350 000007fe`fdeb3a7f shell32!CShellTaskThread::s_ThreadProc+0x22
00000000`0533f380 00000000`77a7f61b shlwapi!ExecuteWorkItemThreadProc+0xf
00000000`0533f3b0 00000000`77a79bcf ntdll!RtlpTpWorkCallback+0x16b
00000000`0533f490 00000000`7785f33d ntdll!TppWorkerThread+0x5ff
00000000`0533f790 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`0533f7c0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   3  Id: 974.87c Suspend: 0 Teb: 000007ff`fffaa000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`058ff498 000007fe`fda713b6 ntdll!NtWaitForMultipleObjects+0xa
00000000`058ff4a0 00000000`77862f53 KERNELBASE!WaitForMultipleObjectsEx+0xe8
00000000`058ff5a0 00000000`7797bc3d kernel32!WaitForMultipleObjectsExImplementation+0xb3
00000000`058ff630 00000000`7797905a user32!RealMsgWaitForMultipleObjectsEx+0x12a
00000000`058ff6d0 00000000`77978880 user32!MsgWaitForMultipleObjectsEx+0x46
00000000`058ff710 000007fe`fe74301d user32!MsgWaitForMultipleObjects+0x20
00000000`058ff750 000007fe`fe7430e0 shell32!CShellTaskScheduler::_TT_MsgWaitForMultipleObjects+0x51
00000000`058ff7d0 000007fe`fe73fdeb shell32!CShellTaskScheduler::TT_TransitionThreadToRunningOrTerminating+0xac
00000000`058ff850 000007fe`fe73e3ca shell32!CShellTaskThread::ThreadProc+0x257
00000000`058ff8f0 000007fe`fdeb3a7f shell32!CShellTaskThread::s_ThreadProc+0x22
00000000`058ff920 00000000`77a7f61b shlwapi!ExecuteWorkItemThreadProc+0xf
00000000`058ff950 00000000`77a79bcf ntdll!RtlpTpWorkCallback+0x16b
00000000`058ffa30 00000000`7785f33d ntdll!TppWorkerThread+0x5ff
00000000`058ffd30 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`058ffd60 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   4  Id: 974.c50 Suspend: 0 Teb: 000007ff`fffa8000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05a8f5d8 00000000`77a78f7b ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`05a8f5e0 00000000`7785f33d ntdll!TppWorkerThread+0x2c9
00000000`05a8f8e0 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`05a8f910 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   5  Id: 974.1074 Suspend: 0 Teb: 000007ff`fffa6000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05bafb98 00000000`77a78f7b ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`05bafba0 00000000`7785f33d ntdll!TppWorkerThread+0x2c9
00000000`05bafea0 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`05bafed0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   6  Id: 974.fa4 Suspend: 0 Teb: 000007ff`fffa4000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05cafcf8 000007fe`fda71203 ntdll!NtDelayExecution+0xa
00000000`05cafd00 000007fe`ff7aea10 KERNELBASE!SleepEx+0xab
00000000`05cafda0 000007fe`ff7b203e ole32!CROIDTable::WorkerThreadLoop+0x10
00000000`05cafdd0 000007fe`ff7b358a ole32!CRpcThread::WorkerLoop+0x1e
00000000`05cafe10 00000000`7785f33d ole32!CRpcThreadCache::RpcWorkerThreadEntry+0x1a
00000000`05cafe40 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`05cafe70 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   7  Id: 974.f9c Suspend: 0 Teb: 000007ff`fffa2000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05ebeed8 000007fe`fda713b6 ntdll!NtWaitForMultipleObjects+0xa
00000000`05ebeee0 00000000`77862f53 KERNELBASE!WaitForMultipleObjectsEx+0xe8
00000000`05ebefe0 00000000`7797bc3d kernel32!WaitForMultipleObjectsExImplementation+0xb3
00000000`05ebf070 00000000`7797905a user32!RealMsgWaitForMultipleObjectsEx+0x12a
00000000`05ebf110 00000000`77978880 user32!MsgWaitForMultipleObjectsEx+0x46
00000000`05ebf150 000007fe`fe74301d user32!MsgWaitForMultipleObjects+0x20
00000000`05ebf190 000007fe`fe7430e0 shell32!CShellTaskScheduler::_TT_MsgWaitForMultipleObjects+0x51
00000000`05ebf210 000007fe`fe73fdeb shell32!CShellTaskScheduler::TT_TransitionThreadToRunningOrTerminating+0xac
00000000`05ebf290 000007fe`fe73e3ca shell32!CShellTaskThread::ThreadProc+0x257
00000000`05ebf330 000007fe`fdeb3a7f shell32!CShellTaskThread::s_ThreadProc+0x22
00000000`05ebf360 00000000`77a7f61b shlwapi!ExecuteWorkItemThreadProc+0xf
00000000`05ebf390 00000000`77a79bcf ntdll!RtlpTpWorkCallback+0x16b
00000000`05ebf470 00000000`7785f33d ntdll!TppWorkerThread+0x5ff
00000000`05ebf770 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`05ebf7a0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   8  Id: 974.1364 Suspend: 0 Teb: 000007ff`fffa0000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`05f4efe8 000007fe`fda713b6 ntdll!NtWaitForMultipleObjects+0xa
00000000`05f4eff0 00000000`77862f53 KERNELBASE!WaitForMultipleObjectsEx+0xe8
00000000`05f4f0f0 00000000`7797bc3d kernel32!WaitForMultipleObjectsExImplementation+0xb3
00000000`05f4f180 00000000`7797905a user32!RealMsgWaitForMultipleObjectsEx+0x12a
00000000`05f4f220 00000000`77978880 user32!MsgWaitForMultipleObjectsEx+0x46
00000000`05f4f260 000007fe`fe74301d user32!MsgWaitForMultipleObjects+0x20
00000000`05f4f2a0 000007fe`fe7430e0 shell32!CShellTaskScheduler::_TT_MsgWaitForMultipleObjects+0x51
00000000`05f4f320 000007fe`fe73fdeb shell32!CShellTaskScheduler::TT_TransitionThreadToRunningOrTerminating+0xac
00000000`05f4f3a0 000007fe`fe73e3ca shell32!CShellTaskThread::ThreadProc+0x257
00000000`05f4f440 000007fe`fdeb3a7f shell32!CShellTaskThread::s_ThreadProc+0x22
00000000`05f4f470 00000000`77a7f61b shlwapi!ExecuteWorkItemThreadProc+0xf
00000000`05f4f4a0 00000000`77a79bcf ntdll!RtlpTpWorkCallback+0x16b
00000000`05f4f580 00000000`7785f33d ntdll!TppWorkerThread+0x5ff
00000000`05f4f880 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`05f4f8b0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

   9  Id: 974.c64 Suspend: 0 Teb: 000007ff`fff9e000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0633f4b8 000007fe`fda713b6 ntdll!NtWaitForMultipleObjects+0xa
00000000`0633f4c0 00000000`77862f53 KERNELBASE!WaitForMultipleObjectsEx+0xe8
00000000`0633f5c0 00000000`7797bc3d kernel32!WaitForMultipleObjectsExImplementation+0xb3
00000000`0633f650 00000000`7797905a user32!RealMsgWaitForMultipleObjectsEx+0x12a
00000000`0633f6f0 00000000`77978880 user32!MsgWaitForMultipleObjectsEx+0x46
00000000`0633f730 000007fe`fe74301d user32!MsgWaitForMultipleObjects+0x20
00000000`0633f770 000007fe`fe7430e0 shell32!CShellTaskScheduler::_TT_MsgWaitForMultipleObjects+0x51
00000000`0633f7f0 000007fe`fe73fdeb shell32!CShellTaskScheduler::TT_TransitionThreadToRunningOrTerminating+0xac
00000000`0633f870 000007fe`fe73e3ca shell32!CShellTaskThread::ThreadProc+0x257
00000000`0633f910 000007fe`fdeb3a7f shell32!CShellTaskThread::s_ThreadProc+0x22
00000000`0633f940 00000000`77a7f61b shlwapi!ExecuteWorkItemThreadProc+0xf
00000000`0633f970 00000000`77a79bcf ntdll!RtlpTpWorkCallback+0x16b
00000000`0633fa50 00000000`7785f33d ntdll!TppWorkerThread+0x5ff
00000000`0633fd50 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`0633fd80 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

  10  Id: 974.5a0 Suspend: 0 Teb: 000007ff`fff9c000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`064cf9a8 00000000`77a78f7b ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`064cf9b0 00000000`7785f33d ntdll!TppWorkerThread+0x2c9
00000000`064cfcb0 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`064cfce0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

  11  Id: 974.afc Suspend: 0 Teb: 000007ff`fff98000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`06b7f688 00000000`77a78f7b ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`06b7f690 00000000`7785f33d ntdll!TppWorkerThread+0x2c9
00000000`06b7f990 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`06b7f9c0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

  12  Id: 974.13c0 Suspend: 0 Teb: 000007ff`fff96000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`06c8fa88 00000000`7797c95e user32!NtUserGetMessage+0xa
00000000`06c8fa90 000007fe`fe756cc0 user32!GetMessageW+0x34
00000000`06c8fac0 000007fe`fdeac8ea shell32!MessagePumpThreadProc+0x3e
00000000`06c8fb30 00000000`7785f33d shlwapi!WrapperThreadProc+0x19b
00000000`06c8fc30 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`06c8fc60 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

  13  Id: 974.e28 Suspend: 0 Teb: 000007ff`fff94000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`073af608 00000000`77a78f7b ntdll!ZwWaitForWorkViaWorkerFactory+0xa
00000000`073af610 00000000`7785f33d ntdll!TppWorkerThread+0x2c9
00000000`073af910 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`073af940 00000000`00000000 ntdll!RtlUserThreadStart+0x1d

  14  Id: 974.dc0 Suspend: 0 Teb: 000007ff`fff9a000 Unfrozen
Child-SP          RetAddr           Call Site
00000000`0686fac8 000007fe`fda710ac ntdll!ZwWaitForSingleObject+0xa
00000000`0686fad0 00000000`6eefb46e KERNELBASE!WaitForSingleObjectEx+0x79
00000000`0686fb70 00000001`3f056cd9 dbgeng!DebugClient::DispatchCallbacks+0x5e
00000000`0686fbb0 00000000`7785f33d windbg!EngineLoop+0x389
00000000`0686fbf0 00000000`77a92cc1 kernel32!BaseThreadInitThunk+0xd
00000000`0686fc20 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
0:000> lm
start             end                 module name
00000000`5f790000 00000000`5fb34000   ext        (deferred)             
00000000`6edb0000 00000000`6f235000   dbgeng     (pdb symbols)          c:\users\yoshi\local\symbols\dbgeng.pdb\3905A3278DCD49AEA0C08989F59DB6D91\dbgeng.pdb
00000000`70a30000 00000000`70aac000   exts       (deferred)             
00000000`70ab0000 00000000`70c46000   dbghelp    (deferred)             
00000000`744c0000 00000000`744e3000   uext       (deferred)             
00000000`74620000 00000000`74639000   ntsdexts   (deferred)             
00000000`77840000 00000000`7795f000   kernel32   (pdb symbols)          c:\users\yoshi\local\symbols\kernel32.pdb\20E5C9B96D894AE3AB327C40B4D490A02\kernel32.pdb
00000000`77960000 00000000`77a5a000   user32     (pdb symbols)          c:\users\yoshi\local\symbols\user32.pdb\15F778B3671D4EFDBDCDE79905308B792\user32.pdb
00000000`77a60000 00000000`77c0c000   ntdll      (pdb symbols)          c:\users\yoshi\local\symbols\ntdll.pdb\30976E0BFBF745EF860899932F2B791F2\ntdll.pdb
00000000`77c30000 00000000`77c37000   psapi      (deferred)             
00000001`3f020000 00000001`3f0d1000   windbg     (pdb symbols)          c:\users\yoshi\local\symbols\windbg.pdb\83321AFD3A334F6FA751209AC0F960E91\windbg.pdb
00000001`80000000 00000001`800f1000   VBoxMRXNP   (deferred)             
000007fe`efcb0000 000007fe`efd85000   SearchFolder   (deferred)             
000007fe`f10c0000 000007fe`f1331000   wpdshext   (deferred)             
000007fe`f2050000 000007fe`f2c22000   ieframe    (deferred)             
000007fe`f3360000 000007fe`f339e000   cscobj     (deferred)             
000007fe`f3870000 000007fe`f38ef000   tiptsf     (deferred)             
000007fe`f3ba0000 000007fe`f3c66000   msftedit   (deferred)             
000007fe`f3c70000 000007fe`f3e3a000   explorerframe   (deferred)             
000007fe`f3e40000 000007fe`f3e7b000   msls31     (deferred)             
000007fe`f3e80000 000007fe`f3eb3000   shdocvw    (deferred)             
000007fe`f3ec0000 000007fe`f3fae000   actxprxy   (deferred)             
000007fe`f40e0000 000007fe`f4160000   ntshrui    (deferred)             
000007fe`f4160000 000007fe`f41de000   cscui      (deferred)             
000007fe`f4400000 000007fe`f4435000   EhStorShell   (deferred)             
000007fe`f4490000 000007fe`f449c000   cscdll     (deferred)             
000007fe`f4c80000 000007fe`f4c9c000   davclnt    (deferred)             
000007fe`f4ca0000 000007fe`f4cc2000   ntlanman   (deferred)             
000007fe`f4cd0000 000007fe`f4ce8000   mpr        (deferred)             
000007fe`f4cf0000 000007fe`f4e8c000   NetworkExplorer   (deferred)             
000007fe`f6080000 000007fe`f60f3000   ieproxy    (deferred)             
000007fe`f7840000 000007fe`f78bb000   StructuredQuery   (deferred)             
000007fe`f78c0000 000007fe`f78ca000   davhlpr    (deferred)             
000007fe`f7bd0000 000007fe`f7bda000   drprov     (deferred)             
000007fe`f8380000 000007fe`f838c000   linkinfo   (deferred)             
000007fe`f8640000 000007fe`f86fd000   PortableDeviceApi   (deferred)             
000007fe`f8910000 000007fe`f8937000   EhStorAPI   (deferred)             
000007fe`f9c70000 000007fe`f9c7f000   cscapi     (deferred)             
000007fe`fa6f0000 000007fe`fa71d000   IMJKAPI    (deferred)             
000007fe`fa720000 000007fe`fa7aa000   IMJPAPI    (deferred)             
000007fe`fa7b0000 000007fe`fa7be000   imecfm     (deferred)             
000007fe`fa7c0000 000007fe`fa865000   IMETIP     (deferred)             
000007fe`fa870000 000007fe`fa956000   IMJP10K    (deferred)             
000007fe`fa960000 000007fe`faa93000   IMJPTIP    (deferred)             
000007fe`fb3e0000 000007fe`fb434000   oleacc     (deferred)             
000007fe`fb440000 000007fe`fb44b000   slc        (deferred)             
000007fe`fb4e0000 000007fe`fb51b000   winmm      (deferred)             
000007fe`fb9d0000 000007fe`fb9e4000   samcli     (deferred)             
000007fe`fb9f0000 000007fe`fba05000   wkscli     (deferred)             
000007fe`fba10000 000007fe`fba1c000   netutils   (deferred)             
000007fe`fbb60000 000007fe`fbc8a000   WindowsCodecs   (deferred)             
000007fe`fbc90000 000007fe`fbcc5000   xmllite    (deferred)             
000007fe`fbcd0000 000007fe`fbce8000   dwmapi     (deferred)             
000007fe`fbd40000 000007fe`fbe32000   dui70      (deferred)             
000007fe`fbe40000 000007fe`fbe5f000   thumbcache   (deferred)             
000007fe`fbe60000 000007fe`fbea3000   duser      (deferred)             
000007fe`fbf10000 000007fe`fc125000   GdiPlus    (deferred)             
000007fe`fc1e0000 000007fe`fc236000   uxtheme    (deferred)             
000007fe`fc240000 000007fe`fc36c000   propsys    (deferred)             
000007fe`fc3a0000 000007fe`fc3bd000   samlib     (deferred)             
000007fe`fc3f0000 000007fe`fc5e4000   comctl32   (deferred)             
000007fe`fcc10000 000007fe`fcc3d000   ntmarta    (deferred)             
000007fe`fccf0000 000007fe`fcd0e000   userenv    (deferred)             
000007fe`fcda0000 000007fe`fcdac000   version    (deferred)             
000007fe`fcf20000 000007fe`fcf67000   rsaenh     (deferred)             
000007fe`fd2e0000 000007fe`fd2f7000   cryptsp    (deferred)             
000007fe`fd460000 000007fe`fd483000   srvcli     (deferred)             
000007fe`fd590000 000007fe`fd59b000   secur32    (deferred)             
000007fe`fd820000 000007fe`fd845000   sspicli    (deferred)             
000007fe`fd850000 000007fe`fd8a7000   apphelp    (deferred)             
000007fe`fd8b0000 000007fe`fd8bf000   CRYPTBASE   (deferred)             
000007fe`fd960000 000007fe`fd99d000   winsta     (deferred)             
000007fe`fd9a0000 000007fe`fd9b4000   RpcRtRemote   (deferred)             
000007fe`fd9c0000 000007fe`fd9cf000   profapi    (deferred)             
000007fe`fda60000 000007fe`fda6f000   msasn1     (deferred)             
000007fe`fda70000 000007fe`fdadc000   KERNELBASE   (pdb symbols)          c:\users\yoshi\local\symbols\kernelbase.pdb\348D1C65DBDA492D93C78F2CB782F2712\kernelbase.pdb
000007fe`fdae0000 000007fe`fdb1a000   wintrust   (deferred)             
000007fe`fdb20000 000007fe`fdc86000   crypt32    (deferred)             
000007fe`fdc90000 000007fe`fdcc6000   cfgmgr32   (deferred)             
000007fe`fdcd0000 000007fe`fdcea000   devobj     (deferred)             
000007fe`fdd90000 000007fe`fde99000   msctf      (deferred)             
000007fe`fdea0000 000007fe`fdf11000   shlwapi    (pdb symbols)          c:\users\yoshi\local\symbols\shlwapi.pdb\E9B43DBB68094D50A4F51953C706E34B2\shlwapi.pdb
000007fe`fdf20000 000007fe`fdfea000   usp10      (deferred)             
000007fe`fdff0000 000007fe`fe24c000   iertutil   (deferred)             
000007fe`fe250000 000007fe`fe2ef000   msvcrt     (deferred)             
000007fe`fe370000 000007fe`fe44b000   advapi32   (deferred)             
000007fe`fe450000 000007fe`fe527000   oleaut32   (deferred)             
000007fe`fe6b0000 000007fe`ff436000   shell32    (pdb symbols)          c:\users\yoshi\local\symbols\shell32.pdb\838EA65E8AFC4475B347A42D7952B4632\shell32.pdb
000007fe`ff440000 000007fe`ff4d9000   clbcatq    (deferred)             
000007fe`ff630000 000007fe`ff75e000   rpcrt4     (deferred)             
000007fe`ff760000 000007fe`ff78e000   imm32      (deferred)             
000007fe`ff790000 000007fe`ff992000   ole32      (pdb symbols)          c:\users\yoshi\local\symbols\ole32.pdb\F64122D4FD2D4FB58BDA5B337C0F455A2\ole32.pdb
000007fe`ff9a0000 000007fe`ff9bf000   sechost    (deferred)             
000007fe`ff9c0000 000007fe`ffa0d000   ws2_32     (deferred)             
000007fe`ffa10000 000007fe`ffa18000   nsi        (deferred)             
000007fe`ffa20000 000007fe`ffa2e000   lpk        (deferred)             
000007fe`ffa30000 000007fe`ffa80000   Wldap32    (deferred)             
000007fe`ffa80000 000007fe`ffae7000   gdi32      (deferred)             
000007fe`ffaf0000 000007fe`ffb88000   comdlg32   (deferred)             
000007fe`ffb90000 000007fe`ffd67000   setupapi   (deferred)             

Unloaded modules:
000007fe`fbc90000 000007fe`fbcc5000   xmllite.dll

windows process のアドレスマップ

Linux の pmap の様な情報が欲しいんだけど、なかなか面倒そう。7 の 64-bit 情の 32-bit process, 以前通り2G程度しかメモリが使えないようだけど、その内訳を見たい。仮想サイズでトータルはほぼわかると言えばわかるのだが。

Psapi でプロセスに関する基本的な情報は得られたが、メモリーマップのようなものを得る方法はなさそう。モジュールを enumerate する API も期待せずに試したが、やはりexe/dll のモジュール情報のみ。

windows list memory segments でググる

http://stackoverflow.com/questions/412832/windows-process-memory-viewer

Debugger でやれとか、Process Viewer とか Process Explore。

Process Explore は MS 製だけど、どうやらメモリマップの様な情報はなさそう。

PrcView は、最初の表示に期待するプロセスが見えなかったので、すべてのプロセスを表示させ、Memory のメニューアイテムを押すとそれらしきものが表示された。

http://www.teamcti.com/pview/prcview.htm

しかし、表示はモーダルダイアログ中で、表示内容をコピーしたり、ダンプしたりはできない。でもこの表示どこかで見たような... たぶん cdb で見たんだな。

やはりデバッガを使うか DbgEng interface でプログラムくむしかないってことかな。面倒くさい。

list manipulation

Some codes to understand lists and recursions from practical scala

def nth[T](n: Int, list: List[T]): T = list match {
  case x::_ if n == 0 => x
  case x::xs => nth(n-1, xs)
  case _ => sys.error("illegal argument")
}
//println(nth(2, List(1,2,3)))

def insertAt[T](list: List[T], element: T, n: Int): List[T] = {
  list match {
    case _ if n == 0 => element::list
    case x::xs => x::insertAt(xs, element, n-1)
    case Nil => sys.error("illegal argument")
  }
}
//println(insertAt(List(1,2,3), 4, 0))

def append[T](list: List[T], element: T): List[T] = {
  list match {
    case Nil => element::Nil
    case x::xs => x::append(xs, element)
  }
}
//println(append(List(1,2,3,4), 5))

def length[T](list: List[T]): Int = list match {
  case Nil => 0
  case _::xs => 1 + length(xs)
}
//println(length(List(1,2,3)));

def removeAt[T](list: List[T], n: Int): List[T] = {
  list match {
    case x::xs if n == 0 => xs
    case x::xs => x::removeAt(xs, n - 1)
    case Nil => sys.error("illegal argument")
  }
}
//println(removeAt(List(1,2,3,4), 0))

def concat[A](a: List[A], b: List[A]): List[A] = {
  a match {
    case Nil => b
    case x::xs => x::concat(xs, b)
  }
}
//println(concat(List(1,2), List(5,6)))

asCollector

asCollector(Class arrayClass, int arrayLength) は arrayType の引数を指定した数の引数のリストに変えてくれる。asSpreader はほぼその反対。

import java.lang.invoke.*;
import static java.lang.invoke.MethodType.*;
import static java.lang.invoke.MethodHandles.*;

public class AsCollectorEx {
  public static void main(String[] args) throws Throwable {
    Lookup lookup = lookup();
    MethodHandle m0 = lookup.findStatic(AsCollectorEx.class, "printAll",
        methodType(void.class, Object[].class));
    P("m0   : " + m0);
    MethodHandle mcoll = m0.asCollector(Object[].class, 4);
    mcoll = mcoll.asType(methodType(void.class, String.class, String.class, String.class, String.class));
    P("mcoll: " + mcoll);
    mcoll.invokeExact("Foo", "Bar", "Fizz", "Buzz");

    Object[] params = new Object[] {"Foo", "Bar", "Fizz", "Buzz"};
    MethodHandle mspr = mcoll.asSpreader(Object[].class, 4);
    P("mspr: " + mspr);
    mspr.invokeExact(params);
  }
  public static void printAll(Object[] args) {
    StringBuilder sb = new StringBuilder();
    sb.append("(");
    for (Object o : args) 
      sb.append(o == null ? "(null) " : o.toString() + " ");
    sb.append(")");
    System.out.println(sb.toString());
  }
  static void P(Object o) { System.out.println(o); }
}
m0   : MethodHandle(Object)void
mcoll: MethodHandle(Object,Object,Object,Object)void
(Foo Bar Fizz Buzz )
mspr: MethodHandle(Object)void
(Foo Bar Fizz Buzz )