VxWorks反汇编操作方法说明

您所在的位置:网站首页 vX模块如何嵌入 VxWorks反汇编操作方法说明

VxWorks反汇编操作方法说明

2024-07-17 05:59:35| 来源: 网络整理| 查看: 265

VxWorks反汇编操作方法说明

反汇编作用:一句话,找bug。

步骤:

1.打开VxWorks Development Shell

在这里插入图片描述

2.找到WindRiver Workbench安装目录下的反编译可执行文件objdumppentium.exe,我的是在C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin下,在Shell里执行该exe,设置参数(表示反编译所有),填写镜像路径,并将反汇编输出的文件保存到txt中。(我这儿在桌面放了一个名为vx的文件夹,镜像和目标txt均放于此。)

执行语句如下:

C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin>objdumppentium.exe -D C:\Users\Administrator\Desktop\vx\vxWorks >C:\Users\Administrator\Desktop\vx\vxWorks.txt

或者可以一步步来,先打开C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin,(我的workbench安装在C盘根目录下),按Tab键找到objdumppentium.exe执行,再按出来的提示输入参数和待反汇编的镜像,执行过程如下:

在这里插入图片描述

文字版粘贴如下:

C:\WindRiver>cd C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin>objdumppentium.exe Usage: objdumppentium.exe Display information from object . At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -e, --debugging-tags Display debug information using ctags style -G, --stabs Display (in raw form) any STABS info in the file -W, --dwarf Display DWARF info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file @ Read options from -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this information C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin>objdumppentium.exe -D C:\Users\Administrator\Desktop\vx\vxWorks >C:\Users\Administrator\Desktop\vx\vxWorks.txt C:\WindRiver\gnu\4.1.2-vxworks-6.8\x86-win32\bin>

这样反汇编的内容就被保存到VxWorks.txt里了。

再根据程序出错时报的page fault中的Program Counter即可找出对应的出错汇编语句。 例如

Page Fault Page Dir Base : 0x01a91000 Esp0 0x0366978c : 0x00000216, 0x0366991c, 0x0366984c, 0x00000003 Esp0 0x0366979c : 0x0034f7a8, 0x0625ab11, 0x00000064, 0x00000004 Program Counter : 0x003452d8 Code Selector : 0x00000008 Eflags Register : 0x00010202 Error Code : 0x00000002 Page Fault Addr : 0x00000064 Task: 0x1b08010 "tShellRem56985404"

根据Program Counter : 0x003452d8能够找到出错语句的所在的函数或大致行数,再利用简单的汇编语句知识即可对应到源码上去。当然Page Fault中的Task也可以为你指明发生错误的任务,这样都有利于缩小排查范围。 想要对VxWorks反汇编有更多了解,详见Wind River官方手册《The gnu Binary Utilities》。手册在安装路径下,路径粘贴如下:"$installDir(请自行更改安装路径,如C:\WindRiver)\docs\extensions\eclipse\plugins\com.windriver.ide.doc.wr_gnu_compiler\wr_gnu_compiler_binary_utilities_4.1.2 > The gnu Binary Utilities"



【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


图片新闻

实验室药品柜的特性有哪些
实验室药品柜是实验室家具的重要组成部分之一,主要
小学科学实验中有哪些教学
计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
实验室各种仪器原理动图讲
1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
高中化学常见仪器及实验装
1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
微生物操作主要设备和器具
今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
浅谈通风柜使用基本常识
 众所周知,通风柜功能中最主要的就是排气功能。在

专题文章

    CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭