DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: cuiqingbo
今日帖子: 25
在线用户: 11
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 xiaoxingliang1 (xiaoxingliang1) ★☆☆☆☆ -
普通会员
2022/1/13 13:14:50
标题:
Dll中的崩溃地址怎么查看? 浏览:1196
加入我的收藏
楼主: 主程序中知道怎么查看,DLL中不知道怎么看

DLL插件化框架,DLL中抛出的异常怎么定位代码行数
Access violation at address 119DE6C8 in module 'xxxx.dll'. Read of address 00000028
谢谢了!
----------------------------------------------
-
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2022/1/14 12:33:14
1楼: Here how to do it...

-- for DLL debugger you can use the "BDS.exe" as your "Host Application"

1) Enable all debug options on all projects (DLL file(s)).
2) And disable optimization.
3) Be sure to set the host application to the right EXE file.
4) Build DLL file(s).
5) You can now put breakpoints in both dll and exe. And run the DLL file from the IDE. It starts the EXE file and stops at the requested breakpoints.

It even works when DLL files are dynamically linked (if they are unloaded the blue dots disapear).


StackOverFlow post:
----------
1) Project | Options | Compiler | Debugging | Debug information (check)

2) Then go to Run | Parameters | Host Application and enter the name of your exe.

Add some breakpoints in your DLL code and then click run. 
Your "exe" will be loaded and you can debug the DLL parts in the Delphi IDE.

If your "exe" is already running, click Run | Attach to process

try check "Include remote debug symbols" on the Linker page of project options!

try a breakpoint to hit using the "Run | Parameters" as well as "Run | Attach to process " methods. 

The test DLL I had created had a single stdcall function and was dynamically loaded by a Visual C++ console application.
----------
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2022/1/14 12:33:47
2楼: https://www.microsystools.com/articles/delphi-dll-debugging-help/
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 xiaoxingliang1 (xiaoxingliang1) ★☆☆☆☆ -
普通会员
2022/1/14 13:05:57
3楼: 我是想通过Map文件来查看崩溃代码行数,主程序里知道,DLL中的不知道怎么去定位
----------------------------------------------
-
作者:
男 keymark (嬲) ▲▲▲△△ -
普通会员
2022/1/14 19:24:26
4楼: @3楼
  jcl里面有自己搞吧。
----------------------------------------------
[alias]  co = clone --recurse-submodules  up = submodule update --init --recursiveupd = pullinfo = statusrest = reset --hard懒鬼提速https://www.cctry.com/>http://qalculate.github.io/downloads.htmlhttps://www.cctry.com/
作者:
男 xiaoxingliang1 (xiaoxingliang1) ★☆☆☆☆ -
普通会员
2022/1/14 22:57:33
5楼: 谢谢楼上,我去了解一下
----------------------------------------------
-
作者:
男 ksrsoft (cb168) ★☆☆☆☆ -
普通会员
2022/1/16 13:52:37
6楼: 推荐madExcept用这个
----------------------------------------------
-
作者:
男 xiaoxingliang1 (xiaoxingliang1) ★☆☆☆☆ -
普通会员
2022/1/16 23:30:16
7楼: madExcept在DLL中异常的时候能看到DLL中的详细堆栈信息吗
----------------------------------------------
-
作者:
男 ksrsoft (cb168) ★☆☆☆☆ -
普通会员
2022/1/25 21:40:34
8楼: dll的错误也可以看到
----------------------------------------------
-
作者:
男 jingzu (123456) ★☆☆☆☆ -
盒子活跃会员
2022/1/26 10:14:30
9楼: madExcept
对于 delphi 10.42测试没有用。
----------------------------------------------
永远是DELPHI初学者。
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行70.3125毫秒 RSS