问题描述
我知道-s
选项应该显示更长的参数,但是它并不总是有效(可能是因为那些花括号意味着数组或嵌套参数?).
I know the -s
option should display longer arguments, but it doesn't work always (probably because of those curly brackets meaning array or nested arguments?).
即使运行strace -s1000 my_command
之后,该参数仍会被截断:
Even after running strace -s1000 my_command
this argument is still truncated:
如何查看完整的参数?
推荐答案
strace
参数中有是这样的选项-您应使用 -v 命令行开关.此外,由于此实用程序的开源特性,您可以通过修补strace
来源:
There is such option in the strace
parameters - you should use -v command line switch. Furthermore, due to the opensource nature of this great utility, you can disable abbreviation totally by patching the defs.h
header in the strace
sources:
< #define abbrev(tcp) ((tcp)->qual_flg & QUAL_ABBREV)
---
> #define abbrev(tcp) 0
我从本地gentoo/usr/portage/distfiles/软件源存储中以这种方式strace-4.9
进行了修补.不需要从sourceforge下载最新的strace源.
I've patched that way strace-4.9
from my local gentoo /usr/portage/distfiles/ software sources storage. It doesn't require to download latest strace sources from sourceforge.
这篇关于即使在大括号中,也可以在strace中显示完整的参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!