* Selft tracing utility
@ 2007-02-03 14:59 Simon Toth
2007-02-03 15:19 ` Andreas Schwab
2007-02-03 16:15 ` Bob Rossi
0 siblings, 2 replies; 3+ messages in thread
From: Simon Toth @ 2007-02-03 14:59 UTC (permalink / raw)
To: gdb
Hi,
I'm currently extending the debug support for my programs and trying to
find something that will dump the current call-stack.
GDB can do this, the problem is can a running process dump itself?
My idea is something like:
getpid()
dump the call-stack by running gdb ataching it to the process by pid
abort()
Is there a posibility to run gdb thru some API?
Thx for any ideas
Bc. Simon Toth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Selft tracing utility
2007-02-03 14:59 Selft tracing utility Simon Toth
@ 2007-02-03 15:19 ` Andreas Schwab
2007-02-03 16:15 ` Bob Rossi
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2007-02-03 15:19 UTC (permalink / raw)
To: Simon Toth; +Cc: gdb
Simon Toth <happy.cerberus@gmail.com> writes:
> Is there a posibility to run gdb thru some API?
system() or fork()/execve().
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Selft tracing utility
2007-02-03 14:59 Selft tracing utility Simon Toth
2007-02-03 15:19 ` Andreas Schwab
@ 2007-02-03 16:15 ` Bob Rossi
1 sibling, 0 replies; 3+ messages in thread
From: Bob Rossi @ 2007-02-03 16:15 UTC (permalink / raw)
To: Simon Toth, g; +Cc: gdb
On Sat, Feb 03, 2007 at 03:58:57PM +0100, Simon Toth wrote:
> I'm currently extending the debug support for my programs and trying to
> find something that will dump the current call-stack.
You could just use this,
http://www.gnu.org/software/libc/manual/html_node/Backtraces.html
You can use addr2line to convert the address's it prints to source:line
numbers.
Bob Rossi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-03 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-03 14:59 Selft tracing utility Simon Toth
2007-02-03 15:19 ` Andreas Schwab
2007-02-03 16:15 ` Bob Rossi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox