|
Macro Explorer, 409
macros (various)
C run-time library, 119–120
CommenTater macro, 415–423
DCRT, 668
DECLARE_MEMDEBUG macro, 685
IMPLEMENT_MEMDEBUG macro, 685
MakeAddinFromMacroProj macro, 409
MEMSTRESSINIT macro, 695
MFC, 120–121
NEW_INLINE_WORKAROUND macro, 673–674
SUPERASSERT macro, 121–142, 299–301
implementation highlights, 127–142
TRACE macro, 148
VALIDATEALLBLOCKS macro, 688
VERIFY macro, 116
macros, Visual Studio .NET, 407, 409–415
code elements, 413–415
CommenTater macro, 415–423
executing from Command window, 410
macro parameters, 410–411
in managed code, debugging, 423
project object models, 412–413
Maguire, Steve, 762, 764
MakeAddinFromMacroProj macro, 409
managed code
C# compiler options for debugging, 58
calling properties, 231
flow of operation, viewing, 244, 479, 484–488
hit counts on location breakpoints, 224
macros and add-ins in, debugging, 423
quick breakpoints, 221
SOS (Son of Strike), 235, 396–403
tips and tricks, 245–249
warnings in, 46–48
managed exception monitoring, 455–477
ExceptionMon utility, 467–474
ProfilerLib, 465–467
Profiling API, 455–465
managed modules, 57
managed property pages, add-ins, 433–436
managed tool windows, add-ins, 430–432
MAP files, 63
creating and reading, 493–501
extracting information from, 498–499, 504
PDB2MAP utility, 499–501
understanding contents of, 495–498
/MAP switch (LINK.EXE), 63
/MAPINFO switch (LINK.EXE), 63
McCarthy, Jim, 67, 762
McConnell, Steve, 18, 150, 762
McKay, Everett N., 764
Mem Usage column (Task Manager), 723
MemDumperValidator extension, 678–694
deep validations, 687–688
implementing, 691–694
initialization and termination in C++, 692–693
using with C, 686–687
using with C++, 685–686
memory, 667–715
access breakpoints, WinDBG, 381–382
block identifiers, 679
DCRT (debug C run-time) library, 667–676
features of, 668–669
new operator with, 671–674
release CRT library vs., 677–678
turning on, 670
useful functions, 675–676
debugging with MemDumperValidator extension, 678–694
C classes, 686–687
C++ classes, 685–686
deep validations, 687–688
implementing, 691–694
debugging with MemStress extension, 694–697
default memory manager, 589–590
global memory breakpoints, 277–280
/GS switch, 714
hunting down problems, 699–707
memory overruns, finding, 701–707
uninitialized memory writes, 700–701
leaks, 7
checking for, without utilities, 727
finding with MemDumperValidator extension, 678–694
operating system heap checking, 697–699
overruns, finding, 701–707
page faults, minimizing, 61. See also SWS utility
relocated DLLs, 54
/RTCx switches, 707–713
working set tuning, 723–747
SWS utility, 727–747
WST utility, 726
x86 CPU addressing, 307–309
walking the stack manually, 346–347
memory access breakpoints, WinDBG, 381–382
memory block identifiers, 679
memory leaks, 7. See also memory
checking for, without utilities, 727
MemDumperValidator extension, 678–694
C classes, 686–687
C++ classes, 685–686
deep validations, 687–688
implementing, 691–694
memory overruns, finding, 701–707
Memory window (Visual Studio .NET debugger), 295
walking the stack manually, 346–347
MemStress extension, 694–697
MEMSTRESSINIT macro, 695
MemTouch program, 382
merging trace logs, 720–721
message boxes with assertions, avoiding, 101
Messmer, Hans-Peter, 767
meta (dot) commands, WinDBG, 361, 385–386. See also specific commands by name
Meta-command Help command (WinDBG), 361
methods. See also specific methods by name
calling in Watch windows, 230–233
parameters, asserting, 89
return values, asserting, 90
Microsoft Intermediate Language (MSIL), 250–251, 258–259
Microsoft Intermediate Language Disassembler (ILDASM), 249–266
alternative tools, 266
important instructions, list of, 259–265
branch, 263
comparison, 262
load, 260–261
store, 261–262
tree output descriptions, 251
Microsoft WinDBG debugger, 162, 353–404, 556
basic issues, 356–359
setting up, 357–359
unusual behaviors, 359
breakpoints, 379–382
memory access breakpoints, 381–382
command parameters, 362
command-line arguments, changing, 360
commands, types of, 361
control commands, 385–386
dump files, handling, 393–396
creating, 393–394
debugging, 396
opening, 395–396
evaluating variables, 372–373
exceptions and events, 382–384
executing, stepping, tracing, 373–378
extension commands, 386–393
loading and controlling, 387–388
with SOS (Son of Strike), 398–403
getting help, 361–362
processes and threads, 366–371
attaching to and detaching from processes, 369–371
creating processes in Command window, 369
debugging child processes, 366–367
viewing in Command window, 367–369
SOS extension support, 396–403
symbol handling, 357, 362–366
MinDBG debugger, 171–190
MiniDumpFilterMemory function, 555
MiniDumpFilterMemoryPaths function, 555
minidumps, 71, 300
Create Mini Dump button (SUPERASSERT), 123, 299–301
deadlock dumps in the field, 590
garbage code (disassembled code), 350
MiniDumpFilterMemory function, 555
MiniDumpFilterMemoryPaths function, 555
MiniDumpWithHandleData function, 555
MiniDumpWriteDump function, 554–563
WinDBG debugger, 358, 394
writing, 394, 553–563
MiniDumpWithHandleData function, 555
MiniDumpWriteDump function, 554–563
Minimum Pixels To Drag Before Generating (Tester), 636
misunderstood project requirements, 12–13
mixed mode debugging, 246–247
MNUMDT (Magic Ninja Uninitialized Memory Debugging Technique), 700
module parameters, asserting, 89
ModuleLoadFinished method (ICorProfilerCallback), 458
Modules window, 52
monitoring exceptions, 455–477
ExceptionMon utility, 467–474
in-process debugging, 469–474
ProfilerLib, 465–467
Profiling API, 455–465
Morearty, Mike, 280, 381
mouse recording, Tester utility, 653, 662–665
MOV instruction (x86), 312
MOVS instruction (x86), 333
MOVSX instruction (x86), 329
MOVZX instruction (x86), 329
MS-DOS window in WinDBG, 385
MSIL (Microsoft Intermediate Language), 250–251, 258–259
MSVCMON.EXE, 292–294
MUL instruction (x86), 328
multiple breakpoints on single line, 227–228
multiprocessor machines, testing multithreading applications on, 592
multithreaded programming, 581–626
CreateThread and ExitThread functions, 588–589
DeadlockDetection utility, 595–624
DeadDetExt extension, 598, 610
future of, 624
high-level issues, 596–598
how to use, 598–601
implementing, 601–624
requirements for, 595–596
local storage, accessing, 337, 485
low-level multithreading, 583–587
multiprocessor machines, 592
names of threads, setting in native code, 276
obtaining thread identifiers, 240
TEB (thread environment block), 368
TIB (thread information block), 304, 336, 368
tips and tricks, 581–592
code reviews, 591
deadlock dumps in the field, 590
default memory manager, 589–590
discrete pieces, using, 583
minimizing amount of multithreading, 582
spinning critical sections, 587–588
testing on multiprocessor machines, 592
tracing performance, 718–719
Munyan, Steve, 36
|