DW_AT_location的用途和含义 [英] use and meaning of DW_AT_location

查看:442
本文介绍了DW_AT_location的用途和含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用属性DW_AT_location进行调试.它是dwarf指定的用于调试的属性之一,但无法真正理解其确切含义.以及在编译代码时应何时发出此属性.

I wanted to know the use of the attribute DW_AT_location for debugging. It is one of the attributes specified by dwarf for debugging, but could not really understand what exactly it represents. And also when should this attribute be emitted when we compile a code.

推荐答案

请检查 DWARF 3的第7章规范,数据表示.

例如,如果DW_AT_location的值为0x91 0x68,则从第7章的表中我们可以知道0x91表示DWARF调试信息格式为DW_OP_fbreg,而0x68为SLEB128偏移量,我们可以获得其真实值.值:-24.

For example, if the value of DW_AT_location is 0x91 0x68, from the table in chapter 7, we can know that the 0x91 indicates the DWARF Debugging Information Format which is DW_OP_fbreg, and 0x68 is a SLEB128 offset, we can get its real value: -24.

这篇关于DW_AT_location的用途和含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆