Expand full structure

Preston Moore pkm266 at nyu.edu
Tue Jan 26 18:39:46 UTC 2016


Ok perfect. That is now behaving exactly as I needed it to. Thanks!

Here’s a second question, is there a way to instruct strace  to not pretty print flags values? For example, in the previously mentioned line can I get the integer value of st_mode rather than "S_IFREG | 0644"? I’m working on a tool that parses strace output and would like to avoid having to do some sort of lookup of S_IFREG’s integer value and perform the bitwise or with 0644 (octal right?) myself.

Thanks again,
Preston


> On Jan 25, 2016, at 4:10 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
> 
> On Mon, Jan 25, 2016 at 03:24:06PM -0500, Preston Moore wrote:
>> Hey everyone,
>> 
>> First off, sorry if this is not the proper venue for this sort of question. Is there a way to instruct strace to output the entire structure for *stat[64] calls? For example, in the following line:
>> 
>> fstat64(3, {st_mode=S_IFREG|0644, st_size=82956, ...}) = 0
>> 
>> st_mode and st_size are printed but the rest of the fields in the return stat structure are omitted with a “…” being printed instead.
> 
> strace output is abbreviated by default, you can change this using
> -e abbrev=set option, or just using -v option which effectively does
> the same as -e abbrev=none.
> 
> For details see strace(1) manpage.
> 
> 
> -- 
> ldv





More information about the Strace-devel mailing list