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]

Re: How to debug what I am doing wrong?


Theodore Tso <tytso@mit.edu> writes:

> [...]
> Unfortunately, I then get a different error message:
>
> % stap ext4-check-desk.stp
> semantic error: failed to retrieve location attribute for local 'sb' (dieoffset: 0x9cf22): identifier '$sb' at ext4-check-desk.stp:3:47
> [...]
> Sb is a parameter passed into ext4_check_descriptors, so don't know
> what it's issuing *this* complaint:
>
> static int ext4_check_descriptors(struct super_block *sb)
> {
> 	struct ext4_sb_info *sbi = EXT4_SB(sb);

This is one of the cases where gcc's dwarf debugging data is
incomplete.  See http://gcc.gnu.org/PR23551 and
http://sources.redhat.com/PR1155, and many discussions on gcc-patches
and elsewhere.  While it will get better (RH and others are investing
serious effort in it), it may never be complete enough.

This was one of the motivations for markers.  Since selected
parameters are identified to the compiler, we are assured that the
values will be available, regardless of optimizations or debugging
data.  (This is also an example where James' simple_mark will fail.)

You may be able to work around this by using .statement() probes,
placing one near the call site of this function, hoping to extract the
same pointer.


- FChE


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