大家好,我现在问题是不会用modelsim调试PLI程序,看网上资料和用户手册也没弄明白,还总是报错:
# ** Error: Setting bp 'Unable to set breakpoint, location not executable simMaster.c:104'求高手给出详细步骤,谢谢!
我的开发环境是:
Windows xp sp3
modelsim se6.5b
gcc-4.2.1-mingw32
I searched the ModelSim SE User's Manual to find out how to debug. I want to use cDebug to debug my PLI application, I followed the manual
to Specifying Path in C Debug setup Dialog:C:/modeltech_6.5b/win32/gdb.exe. and then I set a breakpoint in my PLI source file. when I try to run the PLI application. modelsim display an error message:# ** Error: Setting bp 'Unable to set breakpoint, location not executable simMaster.c:104'. now I do not know what to do.
There are bugs in my application, so I want to know what to do to make debug possable.Should I set something else to make modelsim debugable like vc6.0. could you tell me how to config modelsim to debug in more detail,because this problem bother me for a long time.
I followed these steps
>1. Start C Debug by selecting Tools > C Debug > Start C Debug
>2. Select Tools > C Debug > Init mode.
>3. Load my design.
>4 Set the breakpoint on the starting function of your PLI code by using
>the command bp -c
>5 step to debug your code.
>
modelsim displayed thoes messages after what I did:
Start C Debug
cdbg debug_on
# Please wait, starting the C debugger...
# Attached to vsim PID 3596
# Loading C:\modeltech_6.5b\win32/cdbg_load.dll
# The C debugger has started
# Init mode
cdbg init_mode_setup
# 0x7c92120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll
vsim -c -pli D:/modelsimPROJ/dataTransferv5/clkGen.dll -pli D:/modelsimPROJ/dataTransferv5/simMaster.dll work.top
# vsim -c -pli D:/modelsimPROJ/dataTransferv5/clkGen.dll -pli D:/modelsimPROJ/dataTransferv5/simMaster.dll work.top
# Loading D:/modelsimPROJ/dataTransferv5/clkGen.dll
# Shared object file 'D:/modelsimPROJ/dataTransferv5/clkGen.dll'
# veriusertfs array - registering calltf
# Function ptr '0x617012a0'. $clkGen.
# C breakpoint c.1
# mti_cdbg_shared_objects_loaded_1 () at ../../../src/vsim/cdbg_load.c:71
# in ../../../src/vsim/cdbg_load.c
bp -c masterState
# C Breakpoint 'masterState'
# Function "masterState" not defined.
# error from C debugger
# ** Error: Setting bp 'Unable to set breakpoint, location not executable masterState'
bp -c master_misctf
# C Breakpoint 'master_misctf'
# Function "master_misctf" not defined.
# error from C debugger
# ** Error: Setting bp 'Unable to set breakpoint, location not executable master_misctf'