Bug 13485 - ARM incorrect parsing of inlined variables
Summary: ARM incorrect parsing of inlined variables
Status: RESOLVED WORKSFORME
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 15:04 UTC by Wade Farnsworth
Modified: 2024-01-19 05:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
inlinedvars.exe debuginfo (3.26 KB, application/octet-stream)
2011-12-08 15:04 UTC, Wade Farnsworth
Details
Disassembled inlinedvars.exe (2.61 KB, text/plain)
2011-12-08 15:05 UTC, Wade Farnsworth
Details
C source from inlinedvars.stp (7.52 KB, text/x-csrc)
2011-12-08 15:06 UTC, Wade Farnsworth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wade Farnsworth 2011-12-08 15:04:47 UTC
Created attachment 6094 [details]
inlinedvars.exe debuginfo

The following error occurs when running the test suite on a beagleboard with Linux 2.6.37.6 and gcc 4.5.1:

Running /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.exp ...
Executing on host: gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c  -g  -lm   -o inlinedvars.exe    (timeout = 300)
spawn gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c -g -lm -o inlinedvars.exe^M
PASS: inlinedvars-m32 compile
executing: stap /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.stp inlinedvars.exe -c ./inlinedvars.exe
PASS: inlinedvars-m32
Executing on host: gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c  -g -O  -lm   -o inlinedvars.exe    (timeout = 300)
spawn gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c -g -O -lm -o inlinedvars.exe^M
PASS: inlinedvars-m32-O compile
executing: stap /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.stp inlinedvars.exe -c ./inlinedvars.exe
FAIL: inlinedvars-m32-O
line 1: expected "call (22,84)"
Got "  (84,22)"
Executing on host: gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c  -g -O2  -lm   -o inlinedvars.exe    (timeout = 300)
spawn gcc /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.c -g -O2 -lm -o inlinedvars.exe^M
PASS: inlinedvars-m32-O2 compile
executing: stap /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.stp inlinedvars.exe -c ./inlinedvars.exe
FAIL: inlinedvars-m32-O2
line 1: expected "call (22,84)"
Got "  (84,22)"
testcase /home/root/stuff/systemtap/testsuite/systemtap.base/inlinedvars.exp completed in 109 seconds
Comment 1 Wade Farnsworth 2011-12-08 15:05:19 UTC
Created attachment 6095 [details]
Disassembled inlinedvars.exe
Comment 2 Wade Farnsworth 2011-12-08 15:06:04 UTC
Created attachment 6096 [details]
C source from inlinedvars.stp
Comment 3 William Cohen 2024-01-19 05:04:37 UTC
I manually ran inlinedvars.stp on the last version of Fedora that supported 32-bit arm. It appears to work correctly:

[wcohen@fedora systemtap]$ rpm -q gcc kernel
gcc-12.2.1-4.fc36.armv7hl
kernel-6.2.15-100.fc36.armv7hl
[wcohen@fedora systemtap]$ uname -a
Linux fedora 6.2.15-100.fc36.armv7hl #1 SMP Thu May 11 17:07:19 UTC 2023 armv7l armv7l armv7l GNU/Linux
[wcohen@fedora systemtap]$ gcc /home/wcohen/systemtap_write/systemtap/testsuite/systemtap.base/inlinedvars.c -g -lm -o inlinedvars.exe
[wcohen@fedora systemtap]$ sudo ../install/bin/stap /home/wcohen/systemtap_write/systemtap/testsuite/systemtap.base/inlinedvars.stp inlinedvars.exe -c ./inlinedvars.exe
WARNING: unused command line option $1/@1
call (22,84)
call2 (128,-22)
main (64,42)