Sources Bugzilla – Bug 13296
inaccessible sdt.h operands of the form symbol(%reg)
Last modified: 2011-12-01 02:50:24 UTC
We have encountered cases where the compiler emits assembler operands for sdt.h parameters that cannot possibly be processed by stap (like in the case of referring to local labels that are lost during the compilation/linking stage). The cure for that has been to use something like -DSTAP_SDT_ARG_CONSTRAINT=r to force values into registers. However, we should at least attempt to resolve globals in the symbol table, within sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg.
readelf -x .note.stapsdt bash-prev Hex dump of section '.note.stapsdt': 0x00000000 08000000 53000000 03000000 73746170 ....S.......stap 0x00000010 73647400 791e4300 00000000 6af74b00 sdt.y.C.....j.K. 0x00000020 00000000 70fc6d00 00000000 62617368 ....p.m.....bash 0x00000030 00626173 685f6675 6e637469 6f6e5f63 .bash_function_c 0x00000040 616c6c00 2d34406c 696e655f 6e756d62 all.-4@line_numb 0x00000050 65722825 72697029 20384025 72736920 er(%rip) 8@%rsi 0x00000060 38402572 62700000 8@%rbp.. nm bash-prev| grep line_number 000000000042df70 T executing_line_number 00000000006e12e0 b function_line_number 00000000006dfdb4 B line_number 00000000006dfdb0 B line_number_base 00000000006e12d8 b line_number_for_err_trap
(In reply to comment #0) > However, we should at least attempt to resolve globals in the symbol > table, within sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg. Note we already have dwflpp::vardie_from_symtable() to do that.
*** Bug 12690 has been marked as a duplicate of this bug. ***