how to read dwarf in linux

这篇具有很好参考价值的文章主要介绍了how to read dwarf in linux。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

sudo apt install dwarfdump
dwarfdump a.out  &> log

Makefile

all:
        gcc demo.c -g -O0

demo.c文章来源地址https://www.toymoban.com/news/detail-577491.html

void main()
{
}

.debug_info

COMPILE_UNIT<header overall offset = 0x00000000>:
< 0><0x0000000c>  DW_TAG_compile_unit
                    DW_AT_producer              GNU C17 11.3.0 -mtune=generic -march=x86-64 -g -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection
                    DW_AT_language              DW_LANG_C11
                    DW_AT_name                  demo.c
                    DW_AT_comp_dir              /home/prometheus/module-test/dwarf
                    DW_AT_low_pc                0x00001129
                    DW_AT_high_pc               <offset-from-lowpc> 11 <highpc: 0x00001134>
                    DW_AT_stmt_list             0x00000000

LOCAL_SYMBOLS:
< 1><0x0000002e>    DW_TAG_subprogram
                      DW_AT_external              yes(1)
                      DW_AT_name                  main
                      DW_AT_decl_file             0x00000001 /home/prometheus/module-test/dwarf/demo.c
                      DW_AT_decl_line             0x00000001
                      DW_AT_decl_column           0x00000006
                      DW_AT_low_pc                0x00001129
                      DW_AT_high_pc               <offset-from-lowpc> 11 <highpc: 0x00001134>
                      DW_AT_frame_base            len 0x0001: 0x9c:
                          DW_OP_call_frame_cfa
                      DW_AT_call_all_calls        yes(1)

.debug_line: line number info for a single cu
Source lines (from CU-DIE at .debug_info offset 0x0000000c):

            NS new statement, BB new basic block, ET end of text sequence
            PE prologue end, EB epilogue begin
            IS=val ISA number, DI=val discriminator value
<pc>        [lno,col] NS BB ET PE EB IS= DI= uri: "filepath"
0x00001129  [   2, 1] NS uri: "/home/prometheus/module-test/dwarf/demo.c"
0x00001131  [   5, 1] NS
0x00001134  [   5, 1] NS ET

.debug_str
name at offset 0x00000000, length  145 is 'GNU C17 11.3.0 -mtune=generic -march=x86-64 -g -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection'
name at offset 0x00000092, length    4 is 'main'

.debug_aranges

COMPILE_UNIT<header overall offset = 0x00000000>:
< 0><0x0000000c>  DW_TAG_compile_unit
                    DW_AT_producer              GNU C17 11.3.0 -mtune=generic -march=x86-64 -g -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection
                    DW_AT_language              DW_LANG_C11
                    DW_AT_name                  demo.c
                    DW_AT_comp_dir              /home/prometheus/module-test/dwarf
                    DW_AT_low_pc                0x00001129
                    DW_AT_high_pc               <offset-from-lowpc> 11 <highpc: 0x00001134>
                    DW_AT_stmt_list             0x00000000


arange starts at 0x00001129, length of 0x0000000b, cu_die_offset = 0x0000000c
arange end

.debug_frame is not present


到了这里,关于how to read dwarf in linux的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • How to use notebook in Ubuntu 22.04

    这个时候,系统会自动打开浏览器,浏览器会自动跳转到页面http://localhost:8888/tree,如下图所示: 如果我们希望停止服务运行,可以在终端窗口中按Ctrl+C,这个时候,终端窗口命令行会出现如下变化 我们再来观察notebook浏览器画面,发现没有任何变化。

    2024年02月10日
    浏览(42)
  • How to disable certificate validations in the Java HTTP Client

    Java 11 introduced the HTTP Client, an API that made it easier to send HTTP requests with vanilla Java. By default, it throws an exception if there are certificate path or hostname verification errors in the request. Let’s see how to bypass certificate validations for cases where this is really necessary. To ignore both certificate path and hostname verif

    2024年01月19日
    浏览(44)
  • How to understand the Trusted Intelligent Computing Service in Huawei Cloud

      可信智能计算服务TICS( Trusted Intelligent Computing Service )打破数据孤岛,在数据隐私保护的前提下,实现行业内部、各行业间的多方数据联合分析和联邦计算。TICS基于安全多方计算MPC、区块链等技术,实现了数据在存储、流通、计算过程中端到端的安全和可审计,推动了

    2024年02月03日
    浏览(48)
  • How to install a specific version of a package in R

    在使用R语言完成数据分析的过程中,很多时候,因为项目实际需要,我们应该指定某些库文件的安装包的版本,这个时候,我们可以基于 devtools 包中的函数 install_version 来完成。 这里,我们以安装库文件 ggplot2 的安装包的版本号为3.3.6为例来说明,即 说明如下: version 版本

    2024年02月21日
    浏览(45)
  • How to fix the limit of 1000 shards per cluster in ES

    Let’s first take a look at the error message in the console. The error message you’re seeing indicates that the maximum number of shards allowed in your Elasticsearch cluster has been reached. By default, Elasticsearch has a limit of 1000 shards per cluster. To fix this error, you have a few options: Increase the maximum number of shards: You can increas

    2024年02月03日
    浏览(63)
  • Java中合并两个数组的4种方法(How to Merge Two Arrays in Java)

    int[] arr1={1, 2, 3, 4, 5, 6}; //first array int[] arr2={7, 8, 9, 0}; //second array int[] arr3={1, 2, 3, 4, 5, 6, 7, 8, 9, 0} //resultant array There are following ways to merge two arrays: 1.Java arraycopy() method 2.Without using arraycopy() method 3.Java Collections 4.Java Stream API Java arraycopy() is the method of System class which belongs to java.la

    2024年02月11日
    浏览(41)
  • How to boot the Raspberry Pi system from a USB Mass Storage Device All In One

    如何从 USB 启动树莓派引导系统 / 如何从 USB 大容量存储设备启动 Raspberry Pi 系统 First Stage Bootloader Second Stage Bootloader https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-flow https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-bootloader-configuration BO

    2024年02月06日
    浏览(49)
  • How to fix the problem that Raspberry Pi cannot use the root user for SSH login All In One

    如何修复树莓派无法使用 root 用户进行 SSH 登录的问题 修改树莓派默认的 pi 用户名和密码后,需要使用 root 用户进行 SSH 登录; 对 pi/home 文件夹进行 备份 ,复制到新用户下 xgqfrms/home 备份后,要 删除 pi 用户, 必须切换到其他用户,毕竟 pi 用户不能自己删除自己呀!⚠️ 给

    2024年02月07日
    浏览(61)
  • How to check RAM Timings and SPD information on Linux

    How to check RAM Timings and SPD information on Linux - BinaryTides Ram timings are technical specs about ram modules that are installed in laptops or desktops. These number indicate the performance of the ram module interms of how fast they can read and write data. The appear as 4 number set separated by a hyphen, for example like this: 16-16-16-39. Now the

    2024年02月13日
    浏览(32)
  • 解决selenium操作Chrome浏览器报错:WebDriverException: Message: ‘chromedriver‘ executable needs to be in PATH

    在使用selenium操作Chrome浏览器报错:selenium. common.exceptions . WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH 截图如下: 主要报错信息内容翻译如下所示: selenium. common.exceptions . WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH 翻译: selenium. common.except

    2024年02月04日
    浏览(53)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包