Hello,
Further to my previous questions on the subject of DWARF: I'm having
difficulty
understanding how to handle relocatable DWARF data using the standard
library.
Currently, I am successfully loading an ELF file and relocating it in memory
(the data is being loaded into an ARM emulator and r
I've figured out what the problem is. The problem in my code was caused by
the fact that this ELF/DWARF file has so many compile units, whereas my
other examples have far fewer compile units. I'll try to explain what my
mistake was:
Task: Looking for the function declaration file/line, for an e
On Sun, Feb 13, 2022 at 1:43 PM stephen.t@gmail.com
wrote:
>
> I've encountered something else that I don't understand. This time regarding
> dwarf.AttrDeclFile and how the value of that field relates to the list of
> source files in the project
>
> From what I can understand, the value of A
I've encountered something else that I don't understand. This time
regarding dwarf.AttrDeclFile and how the value of that field relates to the
list of source files in the project
>From what I can understand, the value of AttrDeclFile is an index into an
array of filenames. If the number is zero
That does help.
I was confused because I was seeing InlinedSubroutines linking back to an
abstract Subroutine, but without a corresponding concrete Subroutine. But
according to the document, if all calls to the abstract Subroutine are
inlined the concrete Subroutine is not included in the DWARF
For general information on DWARF and inlining, you might look at this
design doc:
https://github.com/golang/proposal/blob/master/design/22080-dwarf-inlining.md#example
which describes the changes made to the compiler to add DWARF inlining
support. HTH.
Thanks, Than
On Sat, Feb 5, 2022 at 4:44
Reader.SeekPC() is useful. Thanks. The problem was due to my
misunderstanding of how inlined functions are represented in the DWARF
data.
I've solved it now. Thanks again.
On Saturday, February 5, 2022 at 6:49:06 PM UTC Ian Lance Taylor wrote:
> On Sat, Feb 5, 2022 at 1:45 AM stephen.t@g
On Sat, Feb 5, 2022 at 1:45 AM stephen.t@gmail.com
wrote:
>
> I'm trying to decode the DWARF data in an ELF binary and I'm not sure how to
> handle functions.
>
> I'm using the elf/dwarf package in the Go standard library and successfully
> using it to identify compile units and source files
(This is possibly off-topic)
I'm trying to decode the DWARF data in an ELF binary and I'm not sure how
to handle functions.
I'm using the elf/dwarf package in the Go standard library and successfully
using it to identify compile units and source files and also to find line
entries for an exec