* gdb on automatic pilot?
@ 2011-08-25 0:17 Aurelian Melinte
2011-08-25 0:27 ` Jan Kratochvil
2011-08-25 0:42 ` Sergio Durigan Junior
0 siblings, 2 replies; 4+ messages in thread
From: Aurelian Melinte @ 2011-08-25 0:17 UTC (permalink / raw)
To: gdb
Hello,
I am looking to use gdb to print the stack each time a certain function
is called , then resume execution. And this without manual intervention.
Could anyone please advise if feasible and if yes, how? Any other tool
I can use?
Thanks,
a.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb on automatic pilot?
2011-08-25 0:17 gdb on automatic pilot? Aurelian Melinte
@ 2011-08-25 0:27 ` Jan Kratochvil
2011-08-25 0:42 ` Sergio Durigan Junior
1 sibling, 0 replies; 4+ messages in thread
From: Jan Kratochvil @ 2011-08-25 0:27 UTC (permalink / raw)
To: Aurelian Melinte; +Cc: gdb
On Thu, 25 Aug 2011 02:16:55 +0200, Aurelian Melinte wrote:
> I am looking to use gdb to print the stack each time a certain
> function is called , then resume execution. And this without manual
> intervention.
(gdb) break malloc
Breakpoint 1 at 0x483940
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>backtrace
>continue
>end
(gdb) set pagination off
(gdb) run
See also:
$ info '(gdb)Break Commands'
Regards,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb on automatic pilot?
2011-08-25 0:17 gdb on automatic pilot? Aurelian Melinte
2011-08-25 0:27 ` Jan Kratochvil
@ 2011-08-25 0:42 ` Sergio Durigan Junior
2011-08-25 1:13 ` Aurelian Melinte
1 sibling, 1 reply; 4+ messages in thread
From: Sergio Durigan Junior @ 2011-08-25 0:42 UTC (permalink / raw)
To: Aurelian Melinte; +Cc: gdb
Aurelian Melinte <ame01@gmx.net> writes:
> I am looking to use gdb to print the stack each time a certain
> function is called , then resume execution. And this without manual
> intervention.
Sorry, I'm not sure I understood your question. Will you be already
runnning GDB? If so, you can put a breakpoint at the function and use
`commands' to specify what you want to do when the breakpoint is hit.
Something like:
(gdb) break f
(gdb) commands
> bt
> cont
> end
(gdb) run
Is that what you want?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gdb on automatic pilot?
2011-08-25 0:42 ` Sergio Durigan Junior
@ 2011-08-25 1:13 ` Aurelian Melinte
0 siblings, 0 replies; 4+ messages in thread
From: Aurelian Melinte @ 2011-08-25 1:13 UTC (permalink / raw)
To: gdb
On 24/08/2011 8:41 PM, Sergio Durigan Junior wrote:
> Aurelian Melinte<ame01@gmx.net> writes:
>
>> I am looking to use gdb to print the stack each time a certain
>> function is called , then resume execution. And this without manual
>> intervention.
> Sorry, I'm not sure I understood your question. Will you be already
> runnning GDB? If so, you can put a breakpoint at the function and use
> `commands' to specify what you want to do when the breakpoint is hit.
> Something like:
>
> (gdb) break f
> (gdb) commands
>> bt
>> cont
>> end
> (gdb) run
>
> Is that what you want?
Eaxctly what I was looking for :)
Thanks Sergio and Jan!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-25 1:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 0:17 gdb on automatic pilot? Aurelian Melinte
2011-08-25 0:27 ` Jan Kratochvil
2011-08-25 0:42 ` Sergio Durigan Junior
2011-08-25 1:13 ` Aurelian Melinte
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).