[转载]Trace32 symbol 路径调整

Trace32 symbol 路径调整

Issue:

在JTAG 调试过程中,经常遇到一个情况: binary elf/axf 文件是在某台特定编译服务器产生的,但是本地源代码是在另一个路径。这样导致 data.load 命令导入 elf/axf 文件后 经常 找不到对应的源文件。

Solution:

Lauterbach Trace32 软件包本身提供了这个重新设定源文件路径的功能。实际操作备忘记录在此。

t32_symbol_file_path

 

方法一:

y.spath.list 命令后,显示出对话框,然后手动添加需要的源文件路径。

方法二:

y.spath.SETRECURSEDIR <path> 命令输入后,可以通过 y.spath.list  窗口观察到对应的源文件路径被找到

y_spath_setrecursedir

方法三:

1)去除编译路径前缀 (针对第一张图的路径去掉 \sdb\jenkins\workspace\BUILD_Branch_sofia3g_r_mr1_Cherry_Pick_ctegerrit\  前缀)

data.load C:\zyang\Logs\Sofia3G_R\pre-merge\2015-09-09\cp_1841\mobilevisor.elf  /strippart 5.

2)设置新的相对路径

y.spath.setbasedir M:\workspace\sofia3g_r_mr1_cte

3)/RelPATH 参数: 去除编译目录的绝对路径, 保留相对路径。

data.load.elf  c:\slb.elf /RelPATH

 

Data.Load 功能

• All symbol and debug information already available in TRACE32 is removed.

• The code/data provided by is loaded to the target memory.

• The symbol and debug information provided by is loaded into TRACE32.

• The paths for the hll source files provided by are loaded into TRACE32.

• An internal symbol data base in generated out of the loaded information.

有用命令:

sYmbol.List.SECtion List the section information provided by <file> loaded by “data.load”

sYmbol.List.SOURCE to display the path information for the hll source files that was loaded from <file>

sYmbol.spath.list to display the symbol source path list.

sYmbol.spath.SetDir  设置源文件静态搜索路径

sYmbol.spath.SetDynamicDir  设置源文件动态搜索路径。如果某个路径命中源文件,则下次搜索时,该命中路径成为第一个被搜索路径。

sYmbol.spath.SetRecurseDir   设置递归搜索路径,所有其子目录都将被用于源文件搜索

data.load.elf *\boot_t.elf /nocode /strippath 文件名从给定的ELF文件路径中提取,即移除文件的相对依赖路径

y.list map 按地址显示符号表

data.dump

a:0x22300000   读取物理地址对应数据

 参考:

http://www2.lauterbach.com/pdf/training_hll.pdf

posted @ 2019-04-26 10:39  DF11G  阅读(1561)  评论(0编辑  收藏  举报