http://sourceware.org/bugzilla/show_bug.cgi?id=5978 FYI, all the utilities (fstack, ftrace, ferror, fcatch) now share a common set of options for specifying what a stack backtrace should look like, for instance: $ ./frysk-core/frysk/bindir/ftrace -stack -full-path -sys=write -- /bin/ls [...] 10774.10774 syscall write(1, "config.log files...", 53)\ 10774.10774 dumping stack trace: Task #10774 #0 0x00110402 in __kernel_vsyscall () from /home/scratch/frysk/git/native/[vdso] #1 0x00855135 in new_do_write () from /lib/libc-2.7.so #2 0x0085541f in _IO_do_write@@GLIBC_2.1 () from /lib/libc-2.7.so #3 0x00855d28 in _IO_file_overflow@@GLIBC_2.1 () from /lib/libc-2.7.so #4 0x00858793 in __overflow () from /lib/libc-2.7.so #5 0x0804ea57 in [unknown] from /bin/ls #6 0x0804f026 in [unknown] from /bin/ls #7 0x08050a9e in [unknown] from /bin/ls #8 0x00808390 in __libc_start_main () from /lib/libc-2.7.so #9 0x08049921 in [unknown] from /bin/ls 10774.10774 syscall leave write = -1 ERRNO=38 prints the stack backtrace withouth truncating paths. I've marked down a brainstorming session on what the print-stack options should be for next wednesday's meeting. Andrew
Hi Andrew,
On Thu, 2008-03-20 at 14:33 -0400, Andrew Cagney wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=5978
>
> FYI, all the utilities (fstack, ftrace, ferror, fcatch) now share a
> common set of options for specifying what a stack backtrace should look
> like, for instance:
>
> I've marked down a brainstorming session on what the print-stack options
> should be for next wednesday's meeting.
I think the suggested options in the bug report are nice:
Stack print options:
-n, -number-of-frames NUMBER number of frames to print. Use -n 0 or -n
all to print all frames.
-f, -full-path print the full path to object files
-a, -all Print all information that can be retrieved
about the stack
this is equivalent to -print
functions,params,scopes,fullpath
-v, -virtual Includes virtual frames in the stack trace.
Virtual frames are artificial frames
corresponding to calls to inlined functions
-c, -common print commonly used debug information:this
is equivalent to -print
functions,params,fullpath
-print [item],... itmes to print. Possible items:
functions : print function names using
debug information
scopes : print variables declared in each
scope within the function.
params : print function parameters
fullpath : print full executbale path
Having some options separate and available also in --print [item] is
slightly confusing though, I would propose to make them all "top-level"
options, or all --print [item] options.
Since this is a common option but just for stack trace printing, you
might want to change --print [item] to --stack [item]. Where a --stack
without items replaces the --common option. And maybe replace -a with
--stack all.
Cheers,
Mark