You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess this isn't an issue with ELF files generated by gc, but I'm trying to extract data from C++ libs. It would be nice if your dwarf package wasn't limited to golang 😄
If I use line.Parse() on the .debug_line section of one lib I have, it sees the files and dirs in the first pair of tables, but not the second pair.
On that file, readelf sees two dir tables and two file tables (see below).
I think line.Parse() shouldn't assume that all remaining data is instructions, as it does at line 45. I'm able to work around this by calling Parse() again on a slice starting at DebugLinePrologue.Length + 4. This appears to work correctly even on libraries with as many as 82 directory and file table pairs.
Output of $ readelf -Wwl /path/to/icu_data-l64d-4-0.so:
Raw dump of debug contents of section .debug_line:
Offset: 0x0
Length: 296
DWARF Version: 2
Prologue Length: 290
Minimum Instruction Length: 1
Initial value of 'is_stmt': 1
Line Base: -5
Line Range: 14
Opcode Base: 13
Opcodes:
Opcode 1 has 0 args
Opcode 2 has 1 args
Opcode 3 has 1 args
Opcode 4 has 1 args
Opcode 5 has 1 args
Opcode 6 has 0 args
Opcode 7 has 0 args
Opcode 8 has 0 args
Opcode 9 has 1 args
Opcode 10 has 0 args
Opcode 11 has 0 args
Opcode 12 has 1 args
The Directory Table:
/path/to/winhost/linux64/x86_64/x86_64-i3mingw32host-linux-gnu/sysroot/usr/include
../common/unicode
/path/to/dists/icu/source/stubdata
The File Name Table:
Entry Dir Time Size Name
1 1 0 0 stdint.h
2 2 0 0 udata.h
3 3 0 0 stubdata.c
Line Number Statements:
Offset: 0x12c
Length: 787
DWARF Version: 2
Prologue Length: 684
Minimum Instruction Length: 1
Initial value of 'is_stmt': 1
Line Base: -5
Line Range: 14
Opcode Base: 13
Opcodes:
Opcode 1 has 0 args
Opcode 2 has 1 args
Opcode 3 has 1 args
Opcode 4 has 1 args
Opcode 5 has 1 args
Opcode 6 has 0 args
Opcode 7 has 0 args
Opcode 8 has 0 args
Opcode 9 has 1 args
Opcode 10 has 0 args
Opcode 11 has 0 args
Opcode 12 has 1 args
The Directory Table:
/path/to/inc/system/somemoduleregistry
gen/debug/l64/obj
/path/to/winhost/linux64/x86_64/lib/gcc/x86_64-i3mingw32host-linux-gnu/4.8.1/include
/path/to/winhost/linux64/x86_64/x86_64-i3mingw32host-linux-gnu/sysroot/usr/include/bits
/path/to/winhost/linux64/x86_64/x86_64-i3mingw32host-linux-gnu/sysroot/usr/include
The File Name Table:
Entry Dir Time Size Name
1 1 0 0 registry.h
2 2 0 0 tmp_manifest_datae58d12755ddb176ad98bdcc842e958ed.cpp
3 3 0 0 stddef.h
4 4 0 0 types.h
5 5 0 0 libio.h
6 1 0 0 common.h
7 5 0 0 stdio.h
Line Number Statements:
Extended opcode 2: set Address to 0xdea
Advance Line by 214 to 215
Copy
Special opcode 118: advance Address by 8 to 0xdf2 and Line by 1 to 216
Special opcode 118: advance Address by 8 to 0xdfa and Line by 1 to 217
Advance PC by 2 to 0xdfc
Extended opcode 1: End of Sequence
Set File Name to entry 2 in the File Name Table
<and so on...>
The text was updated successfully, but these errors were encountered:
…line (go-delve#143)
* and together the two integration script run commands
* drop sender integration test
* separate webhook from sender integration tests in workflow
* not using shell scripts for the integration tests
* prob with run
* typo
* attempt to exit script with appropriate exit code
* recombine integration tests
* some odd syntax is required
* fixed integration test run shell scripts
* restored fix to the webhook integration tests for health check postgres not available test
I guess this isn't an issue with ELF files generated by gc, but I'm trying to extract data from C++ libs. It would be nice if your dwarf package wasn't limited to golang 😄
If I use line.Parse() on the .debug_line section of one lib I have, it sees the files and dirs in the first pair of tables, but not the second pair.
On that file, readelf sees two dir tables and two file tables (see below).
I think line.Parse() shouldn't assume that all remaining data is instructions, as it does at line 45. I'm able to work around this by calling Parse() again on a slice starting at
DebugLinePrologue.Length + 4
. This appears to work correctly even on libraries with as many as 82 directory and file table pairs.Output of
$ readelf -Wwl /path/to/icu_data-l64d-4-0.so
:The text was updated successfully, but these errors were encountered: