From: "me at serhei dot io" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug bpf/24953] foreach (v = v1,v2) syntax not behaving correctly in stapbpf
Date: Tue, 03 Sep 2019 14:06:00 -0000 [thread overview]
Message-ID: <bug-24953-6586-2KvhGTcHRg@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24953-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=24953
Serhei Makarov <me at serhei dot io> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |me at serhei dot io
Summary|foreach statement not |foreach (v = v1,v2) syntax
|retrieving correct array |not behaving correctly in
|values in stapbpf |stapbpf
--- Comment #3 from Serhei Makarov <me at serhei dot io> ---
Returning the keys (not the values) is expected behaviour for a simple foreach
statement.
https://sourceware.org/systemtap/langref/6_Statement_types.html#SECTION00076000000000000000
> The foreach statement loops over each element of a named global array, assigning the current key to VAR.
So that doesn't need to be changed.
The current foreach (v = v1, v2 in arr) behaviour in stapbpf is not correct,
however.
If you look at foreach_loop in staptree.h
https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=blob;f=staptree.h;h=27358085596b8e2bf2c6aa41785ffb067327a9c4;hb=HEAD#l758
there should be fields which specify where to store the value, and which are
ignored in bpf-translate.cxx.
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2019-09-03 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 15:59 [Bug bpf/24953] New: foreach statement not retrieving correct array values " sapatel at redhat dot com
2019-08-30 18:41 ` [Bug bpf/24953] " wcohen at redhat dot com
2019-08-30 18:52 ` sapatel at redhat dot com
2019-09-03 14:06 ` me at serhei dot io [this message]
2019-09-26 19:55 ` [Bug bpf/24953] foreach (v = v1,v2) syntax not behaving correctly " sapatel at redhat dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-24953-6586-2KvhGTcHRg@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).