* [Bug runtime/29984] New: systemtap can not parse DWARF-5 .debug_line
@ 2023-01-10 15:20 lijunlong at openresty dot com
2023-10-25 14:38 ` [Bug runtime/29984] " wcohen at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: lijunlong at openresty dot com @ 2023-01-10 15:20 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=29984
Bug ID: 29984
Summary: systemtap can not parse DWARF-5 .debug_line
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: runtime
Assignee: systemtap at sourceware dot org
Reporter: lijunlong at openresty dot com
Target Milestone: ---
on fedora34 aarch64, the dwarf version is 5.
the tapset function print_ubacktrace_fileline failed to get the line number.
I stap translater did not generate the .debug_line to the C code.
I found it the following patch will add the .debug_line data to the c code.
But the stap runtime does not support dwarf-5 also.
>
>@@ -7305,6 +7305,12 @@ dump_line_tables_check (void *data, size_t data_len)
>
> version = *((uint16_t *)ptr);
> ptr += 2;
>+ if (version > 4)
>+ {
>+ if (ptr + 2 > (uint8_t *)data + data_len)
>+ return DWARF_CB_ABORT;
>+ ptr += 2; /* address_size(1byte) and segment_selector_size(1byte)*/
>+ }
Below is my test data of the .debug_line dump by eu-readelf.
```
DWARF section [30] '.debug_line' at offset 0x1191e:
Table at offset 0:
Length: 76
DWARF version: 5
Prologue length: 42
Address size: 8
Segment selector size: 0
Min instruction length: 4
Max operations per instruction: 1
Initial value if 'is_stmt': 1
Line base: -5
Line range: 14
Opcode base: 13
Opcodes:
[ 1] 0 arguments
[ 2] 1 argument
[ 3] 1 argument
[ 4] 1 argument
[ 5] 1 argument
[ 6] 0 arguments
[ 7] 0 arguments
[ 8] 0 arguments
[ 9] 1 argument
[10] 0 arguments
[11] 0 arguments
[12] 1 argument
Directory table:
[path(line_strp)]
0 /tmp/t_stap_lS_In4M (7)
File name table:
[path(line_strp), directory_index(udata)]
0 test.c (0), 0
1 test.c (0), 0
Line number statements:
[ 36] set column to 16
[ 38] extended opcode 2: set address to 0x4005a8 <main>
[ 43] copy
[ 44] set column to 5
[ 46] special opcode 19: address+0 = 0x4005a8 <main>, line+1 = 2
[ 47] set column to 1
[ 49] set 'is_stmt' to 0
[ 4a] special opcode 19: address+0 = 0x4005a8 <main>, line+1 = 3
[ 4b] advance address by 8 to 0x4005b0 <__libc_csu_init>
[ 4d] extended opcode 1: end of sequence
```
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug runtime/29984] systemtap can not parse DWARF-5 .debug_line
2023-01-10 15:20 [Bug runtime/29984] New: systemtap can not parse DWARF-5 .debug_line lijunlong at openresty dot com
@ 2023-10-25 14:38 ` wcohen at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: wcohen at redhat dot com @ 2023-10-25 14:38 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=29984
William Cohen <wcohen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wcohen at redhat dot com
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
This should be addressed by git commit 367392917b68 for pr30407.
*** This bug has been marked as a duplicate of bug 30407 ***
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-25 14:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 15:20 [Bug runtime/29984] New: systemtap can not parse DWARF-5 .debug_line lijunlong at openresty dot com
2023-10-25 14:38 ` [Bug runtime/29984] " wcohen at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).