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]

Repost: Inaccurate function parameter location in debug info with gcc 3.x and 4.0


This is a repost. I wonder if anybody tried compiling the kernel with
gcc 3.x and noticed the same problem. Thanks very much!


Hi,


I have encountered a problem with the DWARF debug info when compiling
the kernel with gcc 3.x and 4.0 with optimization flags of either -O1
or -O2. When looking at the parameter locations of, for example,
sys_read, the debug info says they are all in EAX while these
parameters are in fact only read into EAX temporarily in the function
body. Using this inaccurate information, SystemTap looks at EAX at the
function entry when it's told to instrument the function parameters.
Obviously the returned value is bogus.

I'm wondering if people have noticed this problem before. Using gcc
3.x/4.0 with -Os or gcc 4.1 (with either -O2 or -Os) would generate
accurate debug info which gives the correct stack locations of the
parameters. Therefore SystemTap works correctly to get the parameter value.

This happens with all the 2.6.1x kernels I've tested. Thanks very much
for any information you may have.


Yi Feng



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