* [Bug translator/13186] New: systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string
@ 2011-09-13 19:43 anish at chelsio dot com
2011-09-13 19:50 ` [Bug translator/13186] " anish at chelsio dot com
2011-09-13 19:53 ` jistone at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: anish at chelsio dot com @ 2011-09-13 19:43 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13186
Bug #: 13186
Summary: systemtap does not correctly point out offending
structure when accidentally dereferencing a structure
as a string
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
AssignedTo: systemtap@sourceware.org
ReportedBy: anish@chelsio.com
Classification: Unclassified
probe point :
printf("%s : %s\n",thread_indent(1),kernel_string($kobj->dentry->d_name))
error message :
Pass 1: parsed user script and 76 library script(s) using
138788virt/22212res/2784shr kb, in 140usr/10sys/152real ms.
semantic error: 'struct qstr' is being accessed instead of a member: identifier
'$kobj' at /tmp/sysfs.stp:14:53
source: printf("%s :
%s\n",thread_indent(1),kernel_string($kobj->dentry->d_name))
^
Here d_name is a structure of type qstr; which is the offending dereference
however the translator points to $kobj instead of d_name.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug translator/13186] systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string
2011-09-13 19:43 [Bug translator/13186] New: systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string anish at chelsio dot com
@ 2011-09-13 19:50 ` anish at chelsio dot com
2011-09-13 19:53 ` jistone at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: anish at chelsio dot com @ 2011-09-13 19:50 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13186
--- Comment #1 from Anish Bhatt <anish at chelsio dot com> 2011-09-13 19:50:03 UTC ---
Complete script as follows :
probe kernel.function("sysfs_create_group@fs/sysfs/group.c") {
printf("%s :
%s\n",thread_indent(1),kernel_string($kobj->dentry->d_name))
}
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug translator/13186] systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string
2011-09-13 19:43 [Bug translator/13186] New: systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string anish at chelsio dot com
2011-09-13 19:50 ` [Bug translator/13186] " anish at chelsio dot com
@ 2011-09-13 19:53 ` jistone at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2011-09-13 19:53 UTC (permalink / raw)
To: systemtap
http://sourceware.org/bugzilla/show_bug.cgi?id=13186
--- Comment #2 from Josh Stone <jistone at redhat dot com> 2011-09-13 19:53:16 UTC ---
(In reply to comment #0)
> semantic error: 'struct qstr' is being accessed instead of a member: identifier
> '$kobj' at /tmp/sysfs.stp:14:53
> source: printf("%s :
> %s\n",thread_indent(1),kernel_string($kobj->dentry->d_name))
> ^
>
> Here d_name is a structure of type qstr; which is the offending dereference
> however the translator points to $kobj instead of d_name.
The message is generated by dwflpp::translate_final_fetch_or_store, using the
token of the overall expression (e->tok). It should be possible to use the
token of the last dereferencing e->component instead, falling back to e->tok
only if there are no components.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-13 19:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 19:43 [Bug translator/13186] New: systemtap does not correctly point out offending structure when accidentally dereferencing a structure as a string anish at chelsio dot com
2011-09-13 19:50 ` [Bug translator/13186] " anish at chelsio dot com
2011-09-13 19:53 ` jistone 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).