This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bpf/24953] foreach statement not retrieving correct array values in stapbpf


https://sourceware.org/bugzilla/show_bug.cgi?id=24953

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wcohen at redhat dot com

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
Without the assignment in the foreach gets the values:

[wcohen@localhost testsuite]$ more ~/foreach2.stp
global arr 

probe begin { arr[1] = 1; arr[2] = 2; exit()}

probe end { foreach ( v in arr) { printf("%d ", v) } }
[wcohen@localhost testsuite]$ sudo stap --bpf ~/foreach2.stp 
2 1 

Trying to do things like the testsuite systemtap.base/array_slicing.exp or
systemtap.base/foreach_value.stp?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]