惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
博客园 - Franky
F
Fortinet All Blogs
D
Docker
博客园 - 司徒正美
腾讯CDC
Recent Announcements
Recent Announcements
The Cloudflare Blog
B
Blog RSS Feed
GbyAI
GbyAI
T
Tailwind CSS Blog
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志

博客园 - 比尔盖房

USACO: Section 1.5 -- PROB Prime Palindromes USACO: Section 1.5 -- PROB Number Triangles USACO: Section 1.4 -- PROB Arithmetic Progressions USACO: Section 1.3 -- PROB Prime Cryptarithm USACO: Section 1.3 -- PROB Barn Repair USACO: Section 1.3 -- PROB Mixing Milk USACO: Section 1.2 -- PROB Dual Palindromes USACO: Section 1.2 -- PROB Palindromic Squares Programming Pearls: Chatper3 Problem6 [Form letter generator] Programming Pearls: Chatper3 Problem5 [Hyphenation Words] Programming Pearls: Chatper3 Problem4 [Dates Caculation] Programming Pearls: Chatper3 Problem3 [Print Banner] Studying Probability Theory Studying "Concrete Mathematics" Studying "Introduction to Algorithms" Testing SEH tips How DebuggerRCThread is lauched? The magic of NativeWindow-- How does .Net Winform manage Win32 controls .Net Windows Service
Public Symbols vs Private Symbols[zt]
比尔盖房 · 2006-08-21 · via 博客园 - 比尔盖房

When you build a driver or other program, the program's symbols are usually stored in symbol files, although some older compilers store certain symbols in the executable file. When a debugger is analyzing a program, it needs to access the program's symbols.

Typically, symbol files can include any or all of the following symbols:

  • The names and addresses of all functions
  • All data type, structure, and class definitions
  • The names, data types, and addresses of global variables
  • The names, data types, addresses, and scopes of local variables
  • The line numbers in the source code that correspond to each binary instruction

Some program developers might feel uncomfortable sharing all this information with their customers. BinPlace can be used to reduce the amount of symbols in a symbol file.

Some basic symbols, such as function names and global variables, are needed for even the most rudimentary debugging. These are called public symbols. Symbols such as data structure names, global variables visible in only one object file, local variables, and line number information are not always required for debugging, although they are useful for a more in-depth debugging session. These are called private symbols.

A symbol file that contains both private and public symbols is called a full symbol file. A symbol file that contains public symbols alone is called a stripped symbol file.

BinPlace can create a stripped symbol file. It does this by creating a new symbol file that contains only public symbols; the private symbols are removed ("stripped" out). When the most common BinPlace options are used (-a -x -s -n), the stripped symbol files are placed in the directory that is listed after the -s switch, and the full symbol files are placed in the directory that is listed after the -n switch.

When BinPlace strips a symbol file, the stripped and full versions of the file are given identical signatures and other identifying information. This allows you to use either version for debugging.

Note  BinPlace will strip private symbols out of a symbol file when the symbol file is in the same directory as the executable file, and you specify the name of the executable file (along with the appropriate options) on the BinPlace command line. You should not specify the name of the symbol file itself — doing so will result in BinPlace moving the file without altering it.

If you need to determine whether a symbol file contains private symbols, you can use the SymChk tool. SymChk is part of the Debugging Tools for Windows package, and is documented in the help file accompanying that package. See Debugging Tools for NT-Based Operating Systems for details.

If you are submitting your driver to the "Designed for Windows" Logo Program, you can submit stripped symbol files if you prefer not to share your private symbols with Microsoft. Symbol files that have been stripped by BinPlace do not expose any parts of your driver's architecture that normally would be considered confidential. For more information about the "Designed for Windows" Logo Program, see "Designed for Windows" Logo Testing.