From: Andrew Cagney <ac131313@cygnus.com>
To: Charles James Leonardo Quarra Cappiello <charsquarra@hotmail.com>
Cc: gdb@sources.redhat.com
Subject: Re: questions / suggestions about gdb
Date: Tue, 07 May 2002 15:02:00 -0000 [thread overview]
Message-ID: <3CD84EE3.5040506@cygnus.com> (raw)
In-Reply-To: <F16j4seHoEjAQUcV4od00005c81@hotmail.com>
> Daniel Jacobowitz wrote:
>
>
>> can i activate the 'generate-core-file' a few steps before the program
>> breaks?
>
> Whenever you want to; you just issue the command, and then you can come
> back to look at the core file later.
>
>
> my question is; how the debugger would automatically know that three steps further the program will break and generate a core file; i guess to generate core files on every (say, 100 steps) could help a lot too.
In theory .... In addition to saving the internal state of the program,
you'll need to record all the external state and any additional I/O that
the running program performs. That way you can exactly replay that
program's behavour (this gets tricky when you're trying to to timers
just right). I suspect you'd end up having to use a simulator for this.
Alternativly, you can ignore the external state problem and get
something working most of the time (via something like fork()?).
Another possability is to have GDB use its builtin-simulator to look
ahead a few instructions at what the inferior would do given its current
state. Provided the simulator doesn't modify the inferior (debugged
process) nor do I/O it shouldn't affect the program that is running.
enjoy,
Andrew
next prev parent reply other threads:[~2002-05-07 22:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-07 13:36 Charles James Leonardo Quarra Cappiello
2002-05-07 15:02 ` Andrew Cagney [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-05-08 6:55 Charles James Leonardo Quarra Cappiello
2002-05-08 5:48 Michael Elizabeth Chastain
2002-05-08 6:47 ` Eli Zaretskii
2002-05-08 6:58 ` Petr Sorfa
2002-05-08 6:53 ` Petr Sorfa
2002-05-07 15:18 Charles James Leonardo Quarra Cappiello
2002-05-07 12:06 Charles James Leonardo Quarra Cappiello
2002-05-07 13:03 ` Daniel Jacobowitz
2002-05-07 11:58 Charles James Leonardo Quarra Cappiello
2002-05-07 12:00 ` Daniel Jacobowitz
2002-05-07 12:22 ` William A. Gatliff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CD84EE3.5040506@cygnus.com \
--to=ac131313@cygnus.com \
--cc=charsquarra@hotmail.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox