随笔分类 -  Under Code

摘要:Demand: There is an application app.exe. We want to debug it. The resources we have include: 1. app.pdb 2. all source code of it (.h/cpp) but without VS project setting files. It maybe build with Jam... 阅读全文
posted @ 2008-03-28 11:06 能巴 阅读(219) 评论(0) 推荐(0)
摘要:#include "stdafx.h" #include class IInterface1 { public: virtual void VFunc1() = 0; }; class IInterface2 { public: virtual void VFunc2() = 0; }; class TestClass1: public IInterface1, public IInter... 阅读全文
posted @ 2008-02-29 14:41 能巴 阅读(283) 评论(0) 推荐(0)
摘要:[转载自:http://blog.csdn.net/starlee/archive/2008/01/24/2062586.aspx] 有下面的一个简单的类: class CNullPointCall { public: static void Test1(); void Test2(); void Test3(int iTest); void Test4(); ... 阅读全文
posted @ 2008-02-25 15:42 能巴 阅读(1783) 评论(1) 推荐(0)
摘要:四个主要类 (1)类CMYAPP 类CMYAPP是应用程序运行的基础,这个类是由MFC中的类CWINAPP派生来的。在这个类中除了有一般类都有的构造函数,一个重要的成员函数就是INITINSTANCE,我们知道,在Windows环境下面可以运行同一程序的多个实例,函数INITINSTANCE的作用就是在生成一个新的实例的时候,完成一些初始化的工作。 下面研究INITINSTANCE函数所做的事情,... 阅读全文
posted @ 2008-01-28 15:42 能巴 阅读(301) 评论(0) 推荐(0)
摘要:Windows程序工作原理 Windows程序设计是一种完全不同于传统的DOS方式的程序设计方法,它是一种事件驱动方式的程序设计模式。在程序提供给用户的界面中有许多可操作的可视对象。用户从所有可能的操作中任意选择,被选择的操作会产生某些特定的事件,这些事件发生后的结果是向程序中的某些对象发出消息,然后这些对象调用相应的消息处理函数来完成特定的操作。Windows应用程序的最大特点就是程序没有固定的... 阅读全文
posted @ 2008-01-28 11:20 能巴 阅读(375) 评论(0) 推荐(0)
摘要:Go to: http://martinfowler.com/articles/continuousIntegration.html 阅读全文
posted @ 2008-01-21 16:18 能巴 阅读(223) 评论(0) 推荐(0)
摘要:We can attach the debugger onto any running process at any time. Two cases: 1. Unhandled exception is thrown in some thread of a process. A dialog will pop up to ask user to terminate the process or d... 阅读全文
posted @ 2008-01-13 20:31 能巴 阅读(465) 评论(0) 推荐(0)
摘要:A Default Heap That Grows and Spreads In its simplest form, the default heap spans a range of addresses. Some ranges are reserved, while others are committed and have pages of memory associated with t... 阅读全文
posted @ 2008-01-02 23:10 能巴 阅读(253) 评论(0) 推荐(0)
摘要:Shared Memory in Windows NT Both code and data are treated the same way in Windows NT—both are represented by pages of memory and both have their pages backed by a file on disk. The only real differen... 阅读全文
posted @ 2008-01-02 22:22 能巴 阅读(620) 评论(0) 推荐(0)
摘要:Very basic words: The foundation for the system provides the answer to how VMM is able to perform these seemingly miraculous functions. VMM is constructed upon a page-based memory management scheme... 阅读全文
posted @ 2008-01-02 21:47 能巴 阅读(436) 评论(0) 推荐(0)
摘要:Yeah, nothing more, just note how to say “野指针" in english. Stray pointer, funny! 阅读全文
posted @ 2007-12-29 10:24 能巴 阅读(287) 评论(2) 推荐(0)
摘要:Realizing 4 GB of Address Space NOte: every process has its own page directory. Translating a virtual address from page directory to page frame is similar to traversing a b-tree structure, where the ... 阅读全文
posted @ 2007-12-29 10:10 能巴 阅读(202) 评论(0) 推荐(0)
摘要:In debugging big software, if loading all pdbs in starting up it, it consumes too long time. But it's really good method because we can debug into the code section that really does the work in un... 阅读全文
posted @ 2007-12-28 11:01 能巴 阅读(227) 评论(0) 推荐(0)
摘要:Rebase and bind is a must for any software product before release. Apparently, the work can't be done partly. For example, there are 20 teams to develop the product. It should not happen that each te... 阅读全文
posted @ 2007-12-27 17:02 能巴 阅读(263) 评论(0) 推荐(0)
摘要:After I release the document from memeory, I forget to set NULL to the document pointer. Then later when trying to do dynamic_cast, above dialog pops up. But It's not proved true by below code: { CTe... 阅读全文
posted @ 2007-12-27 16:08 能巴 阅读(854) 评论(0) 推荐(0)
摘要:http://msdn2.microsoft.com/en-us/library/ms810432.aspx 阅读全文
posted @ 2007-12-20 22:36 能巴 阅读(357) 评论(0) 推荐(0)
摘要:1. PC-Lint在vs2005下配置使用 2. PC-Lint 重要文件说明 Msg.txt :解释告警的内容。 选用的.lnt :包含头文件的路径,-i选项。 env-选用的编辑环境.lnt :讲述如何将PC-lint与对应的编辑环境结合起来。 co-xxx.lnt :选定的编译器。 STD.LNT :内存模型等全局性东西。 LIB-xxx.LNT :库... 阅读全文
posted @ 2007-12-09 22:39 能巴 阅读(658) 评论(0) 推荐(0)
摘要:下面有从浅入深的6个问题,您可以尝试回答一下 一个如下的语句for (int i = 0; i < 10; i++){if (i == 5)j = 5;},什么都写在一行,你怎么在j=5前面插入断点 在一个1000次的循环体内部设置断点,你希望当循环进行到900次后中断,怎么才能做到呢? 你有一个表达式在上面循环的某一次发生了变化,你想知道是哪一次,在哪个地方,怎么才能做... 阅读全文
posted @ 2007-11-22 17:16 能巴 阅读(320) 评论(1) 推荐(0)
摘要:1. The address assigned by Compiler is virtual address. Why? because compiler definitely has no way to decide the physical memory address ahead of running the program. 2. My understanding of the proce... 阅读全文
posted @ 2007-11-14 09:27 能巴 阅读(309) 评论(0) 推荐(0)
摘要:I. 内存分配问题 1. 变量未初始化。下面的程序在debug中运行的很好。 thing * search(thing * something) BOOL found; for(int i = 0; i field == something->field) { /* found it */ found = TRUE; break; } /* found it */ } if(found) retu... 阅读全文
posted @ 2007-10-30 19:00 能巴 阅读(386) 评论(0) 推荐(0)