* [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member'
@ 2016-07-29 15:21 fche at redhat dot com
2016-07-29 16:06 ` [Bug translator/20423] " jhgorse at gmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: fche at redhat dot com @ 2016-07-29 15:21 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=20423
Bug ID: 20423
Summary: improve error message for dwarf $var 'struct ... being
accessed instead of member'
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: fche at redhat dot com
Target Milestone: ---
% stap -p2 -v -e 'probe kernel.function("dput") { println(
@cast($dentry->d_inode, "struct inode")->i_count) }'
Pass 1: parsed user script and 134 library scripts using
274368virt/76604res/7412shr/69340data kb, in 160usr/10sys/172real ms.
semantic error: while processing probe kernel.function("dput@fs/dcache.c:749")
from: kernel.function("dput")
semantic error: 'struct {...}' is being accessed instead of a member: operator
'@cast' at <input>:1:42
source: probe kernel.function("dput") { println(
@cast($dentry->d_inode, "struct inode")->i_count) }
^
Here, i_count is a struct atomic_t { unsigned long counter; }; but systemtap's
error message doesn't help a user. We should be printing something better than
"{...}" for the struct/type name, and we should be identifying a member of that
struct/union as an example:
semantic error: 'struct atomic_t' is being accessed instead of a member such as
'->counter': operator '@cast' at <input>:1:42
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug translator/20423] improve error message for dwarf $var 'struct ... being accessed instead of member'
2016-07-29 15:21 [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member' fche at redhat dot com
@ 2016-07-29 16:06 ` jhgorse at gmail dot com
2016-07-31 1:18 ` fche at redhat dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jhgorse at gmail dot com @ 2016-07-29 16:06 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=20423
Joseph Gorse <jhgorse at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jhgorse at gmail dot com
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug translator/20423] improve error message for dwarf $var 'struct ... being accessed instead of member'
2016-07-29 15:21 [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member' fche at redhat dot com
2016-07-29 16:06 ` [Bug translator/20423] " jhgorse at gmail dot com
@ 2016-07-31 1:18 ` fche at redhat dot com
2016-07-31 18:02 ` fche at redhat dot com
2016-07-31 18:19 ` fche at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2016-07-31 1:18 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=20423
--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
The error message is worse than in other cases because of
typedef struct { int counter; } atomic_t;
i.e., the struct is anonymous.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug translator/20423] improve error message for dwarf $var 'struct ... being accessed instead of member'
2016-07-29 15:21 [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member' fche at redhat dot com
2016-07-29 16:06 ` [Bug translator/20423] " jhgorse at gmail dot com
2016-07-31 1:18 ` fche at redhat dot com
@ 2016-07-31 18:02 ` fche at redhat dot com
2016-07-31 18:19 ` fche at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2016-07-31 18:02 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=20423
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
commit 9cc6246c9793
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug translator/20423] improve error message for dwarf $var 'struct ... being accessed instead of member'
2016-07-29 15:21 [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member' fche at redhat dot com
` (2 preceding siblings ...)
2016-07-31 18:02 ` fche at redhat dot com
@ 2016-07-31 18:19 ` fche at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2016-07-31 18:19 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=20423
--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
By the way, pmachata's dwgrep was worth its weight in gold ^W relearning-effort
again:
% dwgrep /usr/src/debug/lib/modules/$VERSION/vmlinux -e 'entry ?TAG_subprogram
?AT_name (@AT_name == "dput") child ?DW_TAG_formal_parameter @DW_AT_type
@DW_AT_type child (@AT_name == "d_inode") @DW_AT_type @DW_AT_type child
(@AT_name == "i_count") @DW_AT_type @DW_AT_type'
[29b82ac] structure_type
byte_size 4
decl_file "include/linux/types.h"
decl_line 175
sibling [29b82c1] typedef
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-31 18:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29 15:21 [Bug translator/20423] New: improve error message for dwarf $var 'struct ... being accessed instead of member' fche at redhat dot com
2016-07-29 16:06 ` [Bug translator/20423] " jhgorse at gmail dot com
2016-07-31 1:18 ` fche at redhat dot com
2016-07-31 18:02 ` fche at redhat dot com
2016-07-31 18:19 ` fche 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).