zoukankan      html  css  js  c++  java
  • [Tip: debugging]More Debugging skills

    Based on researching a issue met on work, I summarize several new points about debugging:

    1. Process directory. As we know, GetCurrentDirectory will return current directory for current process, and SetCurrentDirectory can change the directory for current process. When calling LoadLibrary, it will search PATH + process current directory mainly to get the required dll loaded. Detail about dll search order, please refer to:

    http://msdn.microsoft.com/en-us/library/ms682586%28VS.85%29.aspx

    2. VS Debug => Exceptions. As we know, if there happened exceptions in program but there is no place to catch it, our program will crash. But by VS's "Exceptions" dialog, we can break when happening those checked exceptions to get better callstack for debugging. It's really useful.

    3. Further understand pdb file. Once you can connect VS debugger.exe with the RELEASE application you intent to debug, and to replace the to-be-debugged modules with optimized dll + pdb files, and set proper breakpoints that are to be touched, you can debug your release application now! Key note: pdb file stores source file line, etc information.

  • 相关阅读:
    2019 Multi-University Training Contest 1
    2019江西省省赛
    2019牛客暑期多校训练营 第二场
    母函数
    树形DP
    蓝桥杯-标题:打印图形
    蓝桥杯-标题:史丰收速算
    蓝桥杯-标题:切面条
    蓝桥杯-标题:李白打酒
    蓝桥杯-标题:啤酒和饮料
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1610338.html
Copyright © 2011-2022 走看看