* fstack options
@ 2007-06-11 20:27 Sami Wagiaalla
2007-06-12 21:56 ` Sami Wagiaalla
0 siblings, 1 reply; 5+ messages in thread
From: Sami Wagiaalla @ 2007-06-11 20:27 UTC (permalink / raw)
To: frysk
right now fstack prints a stack trace using only elf information. I
would like to add the following options to it:
fstack --print={options}
where options include:
functions, scopes, parameters, fullpath
functions: prints function names using debug info
scopes: print function scopse and their respective variables
parameters: print function parameters
fullpath: print full source file path instead of just the file name
the default set can be whatever.
any comments on default params, option names, etc ?
Sami
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fstack options
2007-06-11 20:27 fstack options Sami Wagiaalla
@ 2007-06-12 21:56 ` Sami Wagiaalla
2007-06-14 19:06 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Sami Wagiaalla @ 2007-06-12 21:56 UTC (permalink / raw)
To: Sami Wagiaalla; +Cc: frysk
Sami Wagiaalla wrote:
> right now fstack prints a stack trace using only elf information.
Although this is still the default, personally I think the default
should be print function names and parameters if debuginfo is available
other wise fall back to elf symbol. And provide an option for getting an
elf only stack back trace.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fstack options
2007-06-12 21:56 ` Sami Wagiaalla
@ 2007-06-14 19:06 ` Andrew Cagney
2007-06-15 9:44 ` Mark Wielaard
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2007-06-14 19:06 UTC (permalink / raw)
To: Sami Wagiaalla; +Cc: frysk
fstack's, and its pre-cursors - gstack and pstack, first priority is
speed - get in, get a backtrace, get out - and I think it is fair to
assume that having to scan multi-megabytes of .debug info would run
against that goal (fstack probably shouldn't look in .debug_line by
default either).
Perhaps an option << fstack -a >> to reverse the goal and display
everything known about the function would address this.
Andrew
Sami Wagiaalla wrote:
> Sami Wagiaalla wrote:
>> right now fstack prints a stack trace using only elf information.
> Although this is still the default, personally I think the default
> should be print function names and parameters if debuginfo is
> available other wise fall back to elf symbol. And provide an option
> for getting an elf only stack back trace.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fstack options
2007-06-14 19:06 ` Andrew Cagney
@ 2007-06-15 9:44 ` Mark Wielaard
2007-06-15 14:07 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Mark Wielaard @ 2007-06-15 9:44 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Sami Wagiaalla, frysk
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On Thu, 2007-06-14 at 13:51 -0400, Andrew Cagney wrote:
> fstack's, and its pre-cursors - gstack and pstack, first priority is
> speed - get in, get a backtrace, get out - and I think it is fair to
> assume that having to scan multi-megabytes of .debug info would run
> against that goal (fstack probably shouldn't look in .debug_line by
> default either).
>
> Perhaps an option << fstack -a >> to reverse the goal and display
> everything known about the function would address this.
So would a 2 stage approach be an idea. fstack just gets the addresses
on the stack, writes them out (or buffers them) and gets out. Then the
result gets pushed through addr2line (or a frysk based alternative if
you want) that pieces together the actual source lines from the
addresses and the exe associated with the pid?
Cheers,
Mark
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: fstack options
2007-06-15 9:44 ` Mark Wielaard
@ 2007-06-15 14:07 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2007-06-15 14:07 UTC (permalink / raw)
To: Mark Wielaard; +Cc: Sami Wagiaalla, frysk
Mark,
A two stage pass might work for an elf based backtrace as only the code
addresses and address map need to be saved. However, for a more
detailed backtrace, involving variable values et.al. the debug info
needs to be scanned during the first pass to determine what to save for
that second pass.
Andrew
Mark Wielaard wrote:
> On Thu, 2007-06-14 at 13:51 -0400, Andrew Cagney wrote:
>
>> fstack's, and its pre-cursors - gstack and pstack, first priority is
>> speed - get in, get a backtrace, get out - and I think it is fair to
>> assume that having to scan multi-megabytes of .debug info would run
>> against that goal (fstack probably shouldn't look in .debug_line by
>> default either).
>>
>> Perhaps an option << fstack -a >> to reverse the goal and display
>> everything known about the function would address this.
>>
>
> So would a 2 stage approach be an idea. fstack just gets the addresses
> on the stack, writes them out (or buffers them) and gets out. Then the
> result gets pushed through addr2line (or a frysk based alternative if
> you want) that pieces together the actual source lines from the
> addresses and the exe associated with the pid?
>
> Cheers,
>
> Mark
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-15 14:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-11 20:27 fstack options Sami Wagiaalla
2007-06-12 21:56 ` Sami Wagiaalla
2007-06-14 19:06 ` Andrew Cagney
2007-06-15 9:44 ` Mark Wielaard
2007-06-15 14:07 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).