Skip to content

Commit 6fdff2f

Browse files
1. 修复了数组声明的语法错误;2. 优化了虚函数表的处理逻辑;3. 改进了语言设置功能;4. 删除了缓存文件相关功能
1 parent 85ac085 commit 6fdff2f

22 files changed

Lines changed: 190 additions & 805 deletions

PDBViewer.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CAPTION "关于 PDB Insight"
3131
FONT 9, "MS Shell Dlg", 400, 0, 0x1
3232
BEGIN
3333
ICON IDI_PDBVIEWER,IDC_STATIC,14,14,21,20
34-
LTEXT "PDB Insight, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX
34+
LTEXT "PDB Insight, Version 1.2",IDC_STATIC,42,14,114,8,SS_NOPREFIX
3535
LTEXT "Copyright (C) 2026 StackAndPointer",IDC_STATIC,42,26,114,8
3636
DEFPUSHBUTTON "确定",IDOK,113,41,50,14,WS_GROUP
3737
END
@@ -53,8 +53,8 @@ END
5353
//
5454

5555
1 VERSIONINFO
56-
FILEVERSION 1,1,0,0
57-
PRODUCTVERSION 1,1,0,0
56+
FILEVERSION 1,2,0,0
57+
PRODUCTVERSION 1,2,0,0
5858
FILEFLAGSMASK 0x3fL
5959
#ifdef _DEBUG
6060
FILEFLAGS 0x1L
@@ -71,12 +71,12 @@ BEGIN
7171
BEGIN
7272
VALUE "CompanyName", "StackAndPointer"
7373
VALUE "FileDescription", "PDB Insight - PDB Viewer"
74-
VALUE "FileVersion", "1.0.0.0"
74+
VALUE "FileVersion", "1.2.0.0"
7575
VALUE "InternalName", "PDBInsight"
7676
VALUE "LegalCopyright", "Copyright (C) 2026 StackAndPointer"
7777
VALUE "OriginalFilename", "PDB Insight.exe"
7878
VALUE "ProductName", "PDB Insight"
79-
VALUE "ProductVersion", "1.1"
79+
VALUE "ProductVersion", "1.2"
8080
END
8181
END
8282
BLOCK "VarFileInfo"

PDBViewer.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
<ClInclude Include="src\Managers\SearchOptimizer.h" />
160160
<ClInclude Include="src\Managers\SettingsManager.h" />
161161
<ClInclude Include="src\Managers\TreeViewManager.h" />
162-
<ClInclude Include="src\Managers\CacheManager.h" />
163162
<ClInclude Include="src\PDB\cvConst.h" />
164163
<ClInclude Include="src\PDB\dia2.h" />
165164
<ClInclude Include="src\PDB\diaCreate.h" />
@@ -190,7 +189,6 @@
190189
<ClCompile Include="src\Managers\SearchOptimizer.cpp" />
191190
<ClCompile Include="src\Managers\SettingsManager.cpp" />
192191
<ClCompile Include="src\Managers\TreeViewManager.cpp" />
193-
<ClCompile Include="src\Managers\CacheManager.cpp" />
194192
<ClCompile Include="src\PDB\diaCreate.cpp" />
195193
<ClCompile Include="src\PDB\PDBExporter.cpp" />
196194
<ClCompile Include="src\PDB\PDBHeaderGenerator.cpp" />

PDBViewer.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
44
<Filter Include="源文件">

README.md

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,102 @@
11
# PDB Insight
22

3-
一款新的、强大且小巧的 PDB 查看工具。
3+
A powerful, lightweight PDB (Program Database) viewer tool.
44

5-
## 功能特点
5+
## Features
66

7-
- **树状视图** - 浏览 PDB 文件中的所有类型、函数、类、结构体、联合体、枚举和全局变量
8-
- **详细信息** - 查看选中项的详细属性
9-
- **头文件视图** - 自动生成类/结构体的 C++ 头文件声明
10-
- **语法高亮** - 头文件视图支持 C++ 语法高亮
11-
- **搜索功能** - 在树状视图中搜索符号
12-
- **导出功能** - 支持导出为 CSVXML 和头文件
13-
- **多语言** - 支持中文和英文界面
14-
- **可调整分隔条** - 灵活调整各视图宽度
15-
- **快捷键支持** - Ctrl+C 复制,Ctrl+F 搜索
7+
- **Tree View** - Browse all types, functions, classes, structs, unions, enums, and global variables in the PDB file
8+
- **Details View** - View detailed properties of selected items
9+
- **Header View** - Automatically generate C++ header declarations for classes/structs
10+
- **Syntax Highlighting** - C++ syntax highlighting in header view
11+
- **Search Function** - Search for symbols in the tree view
12+
- **Export Function** - Support for exporting to CSV, XML, and header files
13+
- **Multi-language Support** - Chinese and English interface
14+
- **Resizable Splitter** - Flexibly adjust the width of each view
15+
- **Keyboard Shortcuts** - Ctrl+C for copy, Ctrl+F for search
1616

17-
## 系统要求
1817

19-
- Windows 7 或更高版本
18+
## System Requirements
2019

21-
## 构建说明
20+
- Windows 7 or later
2221

23-
### 使用 Visual Studio 2022 构建
22+
## Build Instructions
2423

25-
1. 打开 `PDBViewer.sln` 解决方案文件
26-
2. 选择配置(Debug 或 Release)和平台(x64)
27-
3. 点击「生成」→「生成解决方案」或按 F7
24+
### Building with Visual Studio 2022
2825

29-
### 使用命令行构建
26+
1. Open the `PDBViewer.sln` solution file
27+
2. Select configuration (Debug or Release) and platform (x64)
28+
3. Click "Build" → "Build Solution" or press F7
29+
30+
### Building with Command Line
3031

3132
```powershell
32-
# 使用 MSBuild 构建 Release 版本
33+
# Build Release version using MSBuild
3334
& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" PDBViewer.sln /p:Configuration=Release /p:Platform=x64
3435
```
3536

36-
## 项目结构
37+
## Project Structure
3738

3839
```
3940
PDBViewer/
4041
├── src/
41-
│ ├── Core/ # 核心窗口和应用程序逻辑
42-
│ ├── Managers/ # 各个管理器模块
43-
│ └── PDB/ # PDB 解析和导出功能
44-
├── PDBViewer.sln # Visual Studio 解决方案
45-
├── PDBViewer.vcxproj # 项目文件
46-
└── PDBViewer.rc # 资源文件
42+
│ ├── Core/ # Core window and application logic
43+
│ ├── Managers/ # Various manager modules
44+
│ └── PDB/ # PDB parsing and export functionality
45+
├── PDBViewer.sln # Visual Studio solution
46+
├── PDBViewer.vcxproj # Project file
47+
└── PDBViewer.rc # Resource file
4748
```
4849

49-
## 使用方法
50+
## Usage
51+
52+
1. Launch `PDB Insight.exe`
53+
2. Click "File" → "Open" or press Ctrl+O to select a PDB file
54+
3. Browse and select items in the left tree view
55+
4. View detailed properties in the right "Details" tab
56+
5. View automatically generated headers in the right "Header View" tab
57+
6. Use the top search box to search for symbols
58+
7. Right-click on tree view, details table, or header view to access additional functions
59+
60+
## Keyboard Shortcuts
5061

51-
1. 启动 `PDB Insight.exe`
52-
2. 点击「文件」→「打开」或按 Ctrl+O 选择 PDB 文件
53-
3. 在左侧树状视图中浏览和选择项目
54-
4. 在右侧「详细信息」标签页查看详细属性
55-
5. 在右侧「头文件视图」标签页查看自动生成的头文件
56-
6. 使用顶部搜索框搜索符号
57-
7. 右键点击树状视图、详细信息表格或头文件视图可以访问额外功能
62+
- **Ctrl+O** - Open PDB file
63+
- **Ctrl+C** - Copy selected content (details and header views)
64+
- **Ctrl+F** - Search (details and header views)
5865

59-
## 快捷键
66+
## Right-Click Menu Functions
6067

61-
- **Ctrl+O** - 打开 PDB 文件
62-
- **Ctrl+C** - 复制选中内容(详细信息和头文件视图)
63-
- **Ctrl+F** - 搜索(详细信息和头文件视图)
68+
### Tree View
69+
- Toggle offset display format (hex/decimal/both)
6470

65-
## 右键菜单功能
71+
### Details Table
72+
- Copy - Copy the content of the selected cell
73+
- Search - Search using the content of the selected cell
6674

67-
### 树状视图
68-
- 切换偏移值显示格式(十六进制/十进制/两者都显示)
75+
### Header View
76+
- Copy - Copy selected text
77+
- Search - Search using selected text
78+
79+
## Version History
6980

70-
### 详细信息表格
71-
- 复制 - 复制选中单元格的内容
72-
- 搜索 - 使用选中单元格的内容进行搜索
7381

74-
### 头文件视图
75-
- 复制 - 复制选中文本
76-
- 搜索 - 使用选中文本进行搜索
7782

78-
## 版本历史
7983

8084
### 1.0.0.0 (2026)
81-
- 初始版本发布
82-
- 完整的 PDB 查看功能
83-
- 树状视图、详细信息、头文件视图
84-
- 导出功能(CSVXML、头文件)
85-
- 多语言支持
86-
- 分隔条调整
87-
- 快捷键和右键菜单
85+
- Initial release
86+
- Complete PDB viewing functionality
87+
- Tree view, details view, and header view
88+
- Export functionality (CSV, XML, headers)
89+
- Multi-language support
90+
- Resizable splitter
91+
- Keyboard shortcuts and right-click menus
8892

89-
## 许可证
93+
## License
9094

91-
本项目为开源项目。
95+
This project is open source.
9296

93-
## 技术栈
97+
## Technology Stack
9498

9599
- C++/Win32 API
96100
- Visual Studio 2022
97101
- DIA SDK (Debug Interface Access)
98-
- RichEdit 控件
99-
100-
## 联系方式
101-
102-
QQ群号978810590
102+
- RichEdit control

en-US.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,6 @@
162162
"opt_ida_compatible": "IDA Compatible Format(Pure C Struct)",
163163

164164
"button_ok": "OK",
165-
"button_cancel": "Cancel"
165+
"button_cancel": "Cancel",
166+
"info_export_hint": "If symbol information is incomplete, please export to view"
166167
}

src/Core/MainWindow.cpp

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "DragDropManager.h"
1111
#include "DPIManager.h"
1212
#include "SettingsManager.h"
13-
#include "CacheManager.h"
13+
1414

1515
#pragma comment(lib, "comctl32.lib")
1616
#pragma comment(lib, "shell32.lib")
@@ -172,26 +172,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow, LPWSTR lpCmdLine)
172172
UpdateStatusBar(ss.str());
173173
}
174174
}
175-
else if (extension == L".pdbbc")
176-
{
177-
ModuleInfo moduleInfo;
178-
std::wstring errorMsg;
179-
if (CacheManager::GetInstance().LoadCache(moduleInfo, filePath, errorMsg))
180-
{
181-
g_moduleInfo = moduleInfo;
182-
g_pdbLoaded = true;
183175

184-
PopulateTreeView();
185-
186-
std::wstringstream ss;
187-
ss << L"已从缓存加载: " << filePath
188-
<< L" | 函数: " << g_moduleInfo.functions.size()
189-
<< L" | 类: " << g_moduleInfo.classes.size()
190-
<< L" | 结构体: " << g_moduleInfo.structs.size()
191-
<< L" | 联合体: " << g_moduleInfo.unions.size();
192-
UpdateStatusBar(ss.str());
193-
}
194-
}
195176
}
196177
}
197178
}
@@ -217,9 +198,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
217198
case ID_MENU_OPEN:
218199
OpenPDBFile(hWnd);
219200
break;
220-
case ID_MENU_OPEN_CACHE:
221-
OpenCacheFile(hWnd);
222-
break;
201+
223202
case ID_MENU_EXPORT_CSV:
224203
ExportToCSV(hWnd);
225204
break;

0 commit comments

Comments
 (0)