我在ubuntu 13.10上使用内核3.11.0-generic运行systemtap 2.2.1.
以下脚本
probe begin {
printf("Started...\n")
}
probe kernel.function("netif_receive_skb") {
printf("%s\n",$skb$$);
exit();
}
Run Code Online (Sandbox Code Playgroud)
打印以下结果
root @ u1310:〜#stap net.stp
入门...
{.next = 0x0,.prev = 0x0,.tstamp = {.tv64 = 0} ,. sk = 0x0,.dev = 0xffff880134c94000,.cb ="",._ skb_refdst = 0,.sp = 0x0,.len = 46,.data_len = 0,.mac_len = 14,.hdr_len = 0,= {.csum = 0,= {.csum_start = 0,.csum_offset = 0}} ,. priority = 0,.local_df = 0,.cloned = 0,.ip_summed = 1,.nohdr = 0,.nfctinfo = 0,.pkt_type = 0,.fclone = 0,.ipvs_property = 0,.peeked = 0,.nf_trace = 0,.protocol = 8,.destructor = 0x0,.nfct = 0x0,.nfct_reasm = 0x0,.nf_bridge = 0x0,.skb_iif = 0,... } < - 如何打印所有字段而不仅仅是省略号?
根@ U1310:〜#
如何打印结构中的所有字段而不是" 省略号 "...
任何帮助,指针和/或参考将不胜感激,我的google-fu只带我到目前为止...
来自systemtap的tapsets.cxx:
2909 void
2910 dwarf_pretty_print::recurse_struct_members (Dwarf_Die* type, target_symbol* e,
2911 print_format* pf, int& count)
2965 // NB: limit to 32 args; see PR10750 and c_unparser::visit_print_format.
2966 if (pf->args.size() >= 32)
2967 {
2968 pf->raw_components.append("...");
2969 break;
2970 }
Run Code Online (Sandbox Code Playgroud)
这是一个与安全约束相关的实现限制(不希望冒太多varargs的内核堆栈风险).应该可以在将来修复.
| 归档时间: |
|
| 查看次数: |
276 次 |
| 最近记录: |