Advanced Debugging
About AdvDbg Consult Train Services Products Tools Community Contact  
欢迎光临 高端调试 登录 | 注册 | FAQ
 
  ACPI调试
Linux内核调试
Windows内核调试
 
  调试战役
调试原理
新工具观察
 
  Linux
Windows Vista
Windows
 
  Linux驱动
WDF
WDM
 
  PCI Express
PCI/PCI-X
USB
无线通信协议
 
  64位CPU
ARM
IA-32
  CPU Info Center
 
  ACPI标准
系统认证
Desktop
服务器
 
  Embedded Linux
嵌入式开发工具
VxWorks
WinCE
嵌入式Windows
 
  格蠹调试套件(GDK)
  格蠹学院
  小朱书店
  老雷的微博
  《软件调试》
  《格蠹汇编》
  《软件调试(第二版)》
沪ICP备11027180号-1

《软件调试》的示例程序

帖子发起人: microbe0821   发起时间: 2010-05-07 11:18 上午   回复: 4

Print Search
帖子排序:    
   2010-05-07, 11:18 上午
microbe0821 离线,最后访问时间: 2011/11/15 4:40:06 microbe0821

发帖数前150位
注册: 2010-04-26
发 贴: 7
Crying [:'(] 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
Reply Quote
CpuWhere确实是个amazing的程序,程序只支持单核,所以我把我的CPU关掉了一个核心,程序可以正常的运行;通过DbgView也看到IA32_DBGCTRL寄存器的值也设置正确了(eax = 0xc1),但是就是获取不到BTS数据,每次Fetch都是0 records.

我找了Intel手册看了一下,Setting Up the DS Area里面提到设置BTS的诸多限制,不知道是不是这些限制条件没有满足呢?

很郁闷额~~~请大家帮我分析分析,谢谢啦;
IP 地址: 已记录   报告
   2010-05-07, 11:31 上午
microbe0821 离线,最后访问时间: 2011/11/15 4:40:06 microbe0821

发帖数前150位
注册: 2010-04-26
发 贴: 7
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
Reply Quote
Intel手册上提到的有几条限制,我还没彻底弄明白是什么含义额;
主要是以下几条:
1. DS save area and recording mechanism is not available in the SMM.
The feature is disabled on transition to the SMM mode. Similarly DS recording is disabled on the generation of a machine check exception and is cleared on processor RESET and INIT.

2.Either the system must be prevented from entering A20M mode while DS save
area is active, or bit 20 of all addresses within buffer bounds must be 0.

3.The DS save area is expected to used only on systems with an enabled APIC. The
LVT Performance Counter entry in the APCI must be initialized to use an interrupt
gate instead of the trap gate.

第2和第3条就是书中115页提到的,这些限制条件,我怎么用程序验证或满足呢?
IP 地址: 已记录   报告
   2010-05-08, 10:23 上午
Raymond 离线,最后访问时间: 2020/7/3 3:40:25 格蠹老雷

发帖数前10位
注册: 2005-12-19
发 贴: 1,303
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
Reply Quote

请问Windows系统的版本是什么?建议你用双机内核调试看一下,如果遇到困难,把困难或者失败点的信息描述的更详细一些,或者粘贴一些调试信息过来。


IP 地址: 已记录   报告
   2010-05-08, 21:03 下午
microbe0821 离线,最后访问时间: 2011/11/15 4:40:06 microbe0821

发帖数前150位
注册: 2010-04-26
发 贴: 7
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
Reply Quote
就是没遇到问题呢,,程序能运行,好好的,,但就是fetch不到数据呃~~,谢谢Raymond的回复,我再自己调试看看,再有了问题再上来请教,谢谢~!

也顺便问下,有网友在Core Duo微架构的Intel CPU上执行成功的么?
IP 地址: 已记录   报告
   2010-05-13, 12:05 下午
microbe0821 离线,最后访问时间: 2011/11/15 4:40:06 microbe0821

发帖数前150位
注册: 2010-04-26
发 贴: 7
Re: 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑
Reply Quote
Raymond老师,我在我的机器上执行了CpuWhere程序,能正常运行,但是没有BTS数据,下面是我自己build的驱动打印的Log:
[CpuWhere_1010]
CpuWhere.SYS: entering DriverEntry

[CpuWhere_1010]
CpuWhere: IRP_MJ_CREATE

[CpuWhere_1010]
User mode buddy is active: 1

[CpuWhere_1010]
CPUWHERE_START

[CpuWhere_1010]
CPU Signature is 1067a,family 6.


[CpuWhere_1010]
g_bIsPentium4=0

[CpuWhere_1010]
DS is setup at 8266a458: base ff4fa000, index ff4fa000, max ff508a60, int ff508a6c

[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001
[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:000000c1

[CpuWhere_1010]
StartTracing exits with 0

[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:000000c1

[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001

[CpuWhere_1010]
Starting to read from ff4f9ff4 while index is ff4fa000

[CpuWhere_1010]
0 records read from ff4fa000 to ff4f9ff4, bReadAll=0

[CpuWhere_1010]
0 BTS records returned, bReadAll=1, index reset to ff4fa000.

[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001

[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:000000c1

[CpuWhere_1010]
CPUWHERE_STOP

[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:000000c1

[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001

[CpuWhere_1010]
StartTracing exits with 0

[CpuWhere_1010]
CpuWhere: IRP_MJ_CLOSE

[CpuWhere_1010]
GUI closing: 0

[CpuWhere_1010]
CpuWhere.SYS: unloading

[CpuWhere_1010]
Old IA32_DEBUGCTL=00000000:00000001

[CpuWhere_1010]
Current IA32_DEBUGCTL=00000000:00000001

[CpuWhere_1010]
StartTracing exits with 0

[CpuWhere_1010]
CpuWhere.SYS: memory freed and unloaded
不知道是哪里不对额~~~~
IP 地址: 已记录   报告
高端调试 » 图书 » 《软件调试》的示例程序 » 关于CpuWhere不能在Pentium Dual Core E5300 CPU上获取到任何BTS数据的问题,请大家帮忙释疑

 
Legal Notice Privacy Statement Corporate Governance Corporate Governance
(C)2004-2020 ADVDBG.ORG All Rights Reserved.