From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31135 invoked by alias); 3 Aug 2009 21:13:09 -0000 Received: (qmail 31020 invoked by uid 48); 3 Aug 2009 21:12:53 -0000 Date: Mon, 03 Aug 2009 21:13:00 -0000 From: "jistone at redhat dot com" To: systemtap@sources.redhat.com Message-ID: <20090803211253.10475.jistone@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug tapsets/10475] New: pointer-array confused about array element size X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00275.txt.bz2 When the referenced type of a pointer is an indirect modifier (const, volatile, etc.), loc2c fails to determine the byte size of the elements when you try to use the pointer like an array. For example, the kernel function do_filp_open has a parameter "const char *pathname": $ stap -p2 -ve 'probe kernel.function("do_filp_open"){ println($pathname[0]) }' Pass 1: parsed user script and 58 library script(s) in 230usr/20sys/251real ms. semantic error: confused about array element size: identifier '$pathname' at :1:48 source: probe kernel.function("do_filp_open"){ println($pathname[0]) } ^ Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 430usr/30sys/474real ms. Pass 2: analysis failed. Try again with another '--vp 01' option. I believe this is because array_stride() is getting a DW_TAG_const_type die, which doesn't directly have a byte size. We need iterate down to the real type which has a defined byte size. -- Summary: pointer-array confused about array element size Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: tapsets AssignedTo: systemtap at sources dot redhat dot com ReportedBy: jistone at redhat dot com http://sourceware.org/bugzilla/show_bug.cgi?id=10475 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.