* Who uses gdbreplay?
@ 2008-06-12 18:35 Michael Snyder
2008-06-12 18:55 ` Marc Khouzam
0 siblings, 1 reply; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 18:35 UTC (permalink / raw)
To: gdb
I am interested in knowing if (and how much)
anybody uses the gdbreplay utility that comes
as a part of gdbserver.
It's an interesting (and elegantly simple) utility,
but somewhat limited, and I have some ideas for
improving it. Not much use, though, if nobody
ever uses it!
Thanks,
Michael
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Who uses gdbreplay?
2008-06-12 18:35 Who uses gdbreplay? Michael Snyder
@ 2008-06-12 18:55 ` Marc Khouzam
2008-06-12 19:07 ` Daniel Jacobowitz
2008-06-12 19:12 ` Michael Snyder
0 siblings, 2 replies; 14+ messages in thread
From: Marc Khouzam @ 2008-06-12 18:55 UTC (permalink / raw)
To: Michael Snyder, gdb
Hi,
I've tried to find information in the doc about gdbreplay without luck.
Really quickly, does gdbreplay, as its name suggest, allow to record an
re-run an application session? Does it allow reverse debugging in some form?
And since this is part of gdbserver, I assume its functions are for a target system?
This very morning, I was asked if GDB had any kind of foundation for reverse
debugging on a target. Is gdbreplay what I am looking for?
Thanks
Marc
> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org]On
> Behalf Of Michael Snyder
> Sent: Thursday, June 12, 2008 2:36 PM
> To: gdb@sourceware.org
> Subject: Who uses gdbreplay?
>
>
> I am interested in knowing if (and how much)
> anybody uses the gdbreplay utility that comes
> as a part of gdbserver.
>
> It's an interesting (and elegantly simple) utility,
> but somewhat limited, and I have some ideas for
> improving it. Not much use, though, if nobody
> ever uses it!
>
> Thanks,
> Michael
>
>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 18:55 ` Marc Khouzam
@ 2008-06-12 19:07 ` Daniel Jacobowitz
2008-06-12 19:12 ` Michael Snyder
1 sibling, 0 replies; 14+ messages in thread
From: Daniel Jacobowitz @ 2008-06-12 19:07 UTC (permalink / raw)
To: Marc Khouzam; +Cc: Michael Snyder, gdb
On Thu, Jun 12, 2008 at 02:54:58PM -0400, Marc Khouzam wrote:
> Hi,
>
> I've tried to find information in the doc about gdbreplay without luck.
> Really quickly, does gdbreplay, as its name suggest, allow to record an
> re-run an application session? Does it allow reverse debugging in some form?
> And since this is part of gdbserver, I assume its functions are for a target system?
>
> This very morning, I was asked if GDB had any kind of foundation for reverse
> debugging on a target. Is gdbreplay what I am looking for?
No. gdbreplay allows you to rerun a remote protocol conversation from
a log. This only works if you issue exactly the same commands to GDB;
it is a very simple program, and only knows "what packet do I expect
next" and "what reply should I send to the expected packet". It's
basically a debugging aid for the remote protocol.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Who uses gdbreplay?
2008-06-12 18:55 ` Marc Khouzam
2008-06-12 19:07 ` Daniel Jacobowitz
@ 2008-06-12 19:12 ` Michael Snyder
2008-06-12 19:19 ` Daniel Jacobowitz
2008-06-12 19:28 ` Marc Khouzam
1 sibling, 2 replies; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 19:12 UTC (permalink / raw)
To: Marc Khouzam; +Cc: gdb
On Thu, 2008-06-12 at 14:54 -0400, Marc Khouzam wrote:
> Hi,
>
> I've tried to find information in the doc about gdbreplay without luck.
> Really quickly, does gdbreplay, as its name suggest, allow to record an
> re-run an application session?
Yes, exactly -- but with rather stringent limits.
In a nutshell, during the replay session, you must give
EXACTLY the same sequence of gdb commands as were given
during the record session. gdbreplay will prompt you for
the next command, but if you do *anything* different,
it will throw up its hands and quit.
> Does it allow reverse debugging in some form?
Not yet -- but that's part of what I have in mind! ;-)
> And since this is part of gdbserver, I assume its functions are for a target system?
Yes -- but you can run gdbserver on a native system, i.e.
"target system" has a rather broad meaning in this context.
> This very morning, I was asked if GDB had any kind of foundation for reverse
> debugging on a target. Is gdbreplay what I am looking for?
Not yet... ;-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 19:12 ` Michael Snyder
@ 2008-06-12 19:19 ` Daniel Jacobowitz
2008-06-12 19:39 ` Michael Snyder
2008-06-12 19:28 ` Marc Khouzam
1 sibling, 1 reply; 14+ messages in thread
From: Daniel Jacobowitz @ 2008-06-12 19:19 UTC (permalink / raw)
To: Michael Snyder; +Cc: Marc Khouzam, gdb
On Thu, Jun 12, 2008 at 12:12:01PM -0700, Michael Snyder wrote:
> > This very morning, I was asked if GDB had any kind of foundation for reverse
> > debugging on a target. Is gdbreplay what I am looking for?
>
> Not yet... ;-)
So... what will the resulting program have in relation to the existing
gdbreplay? It sounds like not much at all.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Who uses gdbreplay?
2008-06-12 19:12 ` Michael Snyder
2008-06-12 19:19 ` Daniel Jacobowitz
@ 2008-06-12 19:28 ` Marc Khouzam
2008-06-12 19:44 ` Michael Snyder
1 sibling, 1 reply; 14+ messages in thread
From: Marc Khouzam @ 2008-06-12 19:28 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb
> > This very morning, I was asked if GDB had any kind of
> foundation for reverse
> > debugging on a target. Is gdbreplay what I am looking for?
>
> Not yet... ;-)
A couple of years ago, you had posted a proposal about a gdb interface
for reverse debugging
http://sourceware.org/ml/gdb/2006-01/msg00013.html
I guess this did not make it to GDB?
Am I correct to understand that the efforts for GDB Reverse debugging
are currently focused on teawater's GDB Record patch, which you guys
are helping with?
To be honnest, I didn't look at the details of that patch (much too low
level for me). However, I was wondering if it considers reverse debugging
with a target (gdbserver or other stub?) From what I understand,
GDB Record, will record register and memory changes as they are made.
For some targets, storing all this may be prohibitive.
I wondered if the recording is done by GDB on the host instead?
Maybe I am going a little fast, already jumping to target reverse debugging?
Thanks for you input
marc
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 19:19 ` Daniel Jacobowitz
@ 2008-06-12 19:39 ` Michael Snyder
2008-06-12 19:47 ` Daniel Jacobowitz
0 siblings, 1 reply; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 19:39 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Marc Khouzam, gdb
On Thu, 2008-06-12 at 15:18 -0400, Daniel Jacobowitz wrote:
> On Thu, Jun 12, 2008 at 12:12:01PM -0700, Michael Snyder wrote:
> > > This very morning, I was asked if GDB had any kind of foundation for reverse
> > > debugging on a target. Is gdbreplay what I am looking for?
> >
> > Not yet... ;-)
>
> So... what will the resulting program have in relation to the existing
> gdbreplay? It sounds like not much at all.
Well I don't want to promise too much too early, but
what I have in mind will be VERY different from the
current gdbreplay.
Rather than requiring you to give exactly the same sequence
of gdb commands as during the recording, it will allow you to
"step" forward (and eventually backward) thru the log, and pause
to examine arbitrary state and issue arbitrary commands at any
point along the way. Of course, you can only examine state that
was saved during the recording session.
In that sense, it will somewhat resemble tracepoint debugging.
In fact, I may be able to allow the "tfind" tracepoint commands
to work, which would allow you to "skip ahead" (or backward)
to an arbitrary point in the log.
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: Who uses gdbreplay?
2008-06-12 19:28 ` Marc Khouzam
@ 2008-06-12 19:44 ` Michael Snyder
0 siblings, 0 replies; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 19:44 UTC (permalink / raw)
To: Marc Khouzam; +Cc: gdb
On Thu, 2008-06-12 at 15:28 -0400, Marc Khouzam wrote:
> > > This very morning, I was asked if GDB had any kind of
> > foundation for reverse
> > > debugging on a target. Is gdbreplay what I am looking for?
> >
> > Not yet... ;-)
>
> A couple of years ago, you had posted a proposal about a gdb interface
> for reverse debugging
> http://sourceware.org/ml/gdb/2006-01/msg00013.html
>
> I guess this did not make it to GDB?
Not to the main trunk, but it's preserved on a branch.
I'm currently creating a new updated branch, with the
eventual idea of working it into the trunk.
> Am I correct to understand that the efforts for GDB Reverse debugging
> are currently focused on teawater's GDB Record patch, which you guys
> are helping with?
Not quite... Teawater's excellent efforts are prompting me
to revive this older work, and attempt to merge the two,
preserving the best elements of each.
But I would like to keep this thread focused on gdbreplay
as much as possible.
> To be honnest, I didn't look at the details of that patch (much too low
> level for me). However, I was wondering if it considers reverse debugging
> with a target (gdbserver or other stub?) From what I understand,
> GDB Record, will record register and memory changes as they are made.
> For some targets, storing all this may be prohibitive.
> I wondered if the recording is done by GDB on the host instead?
That is in fact how gdbreplay works. The log is recorded
by gdb on the host side. Playback is done entirely on the
host side, with no participation by the target (although
to gdb it looks like the playback is coming from the remote
target over a socket).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 19:39 ` Michael Snyder
@ 2008-06-12 19:47 ` Daniel Jacobowitz
2008-06-12 19:57 ` Michael Snyder
0 siblings, 1 reply; 14+ messages in thread
From: Daniel Jacobowitz @ 2008-06-12 19:47 UTC (permalink / raw)
To: Michael Snyder; +Cc: Marc Khouzam, gdb
On Thu, Jun 12, 2008 at 12:39:21PM -0700, Michael Snyder wrote:
> Well I don't want to promise too much too early, but
> what I have in mind will be VERY different from the
> current gdbreplay.
Right. So, I'd suggest it be a different program rather than grafted
onto gdbreplay.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 19:47 ` Daniel Jacobowitz
@ 2008-06-12 19:57 ` Michael Snyder
2008-06-12 20:06 ` Daniel Jacobowitz
0 siblings, 1 reply; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 19:57 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Marc Khouzam, gdb
On Thu, 2008-06-12 at 15:47 -0400, Daniel Jacobowitz wrote:
> On Thu, Jun 12, 2008 at 12:39:21PM -0700, Michael Snyder wrote:
> > Well I don't want to promise too much too early, but
> > what I have in mind will be VERY different from the
> > current gdbreplay.
>
> Right. So, I'd suggest it be a different program rather than grafted
> onto gdbreplay.
Oh, absolutely. No worries.
gdbreplay is elegant in its simplicity, I don't want to
compromise that. I'm actually working in rda.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 19:57 ` Michael Snyder
@ 2008-06-12 20:06 ` Daniel Jacobowitz
2008-06-12 20:15 ` Michael Snyder
0 siblings, 1 reply; 14+ messages in thread
From: Daniel Jacobowitz @ 2008-06-12 20:06 UTC (permalink / raw)
To: Michael Snyder; +Cc: Marc Khouzam, gdb
On Thu, Jun 12, 2008 at 12:56:51PM -0700, Michael Snyder wrote:
> Oh, absolutely. No worries.
>
> gdbreplay is elegant in its simplicity, I don't want to
> compromise that. I'm actually working in rda.
Ok, I think I've gotten turned around. Were you talking about
improvements to gdbreplay on the one hand and a separate program for
traces?
It's kind of a shame you're working in rda. I'm sure it's nice and
all - but it never got contributed to the FSF, and I'm not entirely
happy about new bits of GDB development using it because of that.
It's still got RH copyright notices all over it.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 20:06 ` Daniel Jacobowitz
@ 2008-06-12 20:15 ` Michael Snyder
2008-06-12 20:24 ` Daniel Jacobowitz
0 siblings, 1 reply; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 20:15 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Marc Khouzam, gdb
On Thu, 2008-06-12 at 16:06 -0400, Daniel Jacobowitz wrote:
> On Thu, Jun 12, 2008 at 12:56:51PM -0700, Michael Snyder wrote:
> > Oh, absolutely. No worries.
> >
> > gdbreplay is elegant in its simplicity, I don't want to
> > compromise that. I'm actually working in rda.
>
> Ok, I think I've gotten turned around. Were you talking about
> improvements to gdbreplay on the one hand and a separate program for
> traces?
I guess I'm talking about a separate program that does
essentially a huge superset of gdbreplay's current functionality,
using the same input logfile as is currently used by gdbreplay.
In a sense a replacement for gdbreplay, but the existing
gdbreplay doesn't have to go away, if it serves a purpose.
> It's kind of a shame you're working in rda. I'm sure it's nice and
> all - but it never got contributed to the FSF, and I'm not entirely
> happy about new bits of GDB development using it because of that.
> It's still got RH copyright notices all over it.
Yeah, well -- show me an alternative. Gdbserver? Maybe.
In principle the stuff I'm writing could go into gdbserver
or some other debug-agent codebase.
This is an extension of a different project I was working on,
using rda. It just occurred to me that I could make it use
the log files that are used by gdbreplay, and make them
suddenly really useful.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 20:15 ` Michael Snyder
@ 2008-06-12 20:24 ` Daniel Jacobowitz
2008-06-12 20:56 ` Michael Snyder
0 siblings, 1 reply; 14+ messages in thread
From: Daniel Jacobowitz @ 2008-06-12 20:24 UTC (permalink / raw)
To: Michael Snyder; +Cc: Marc Khouzam, gdb
On Thu, Jun 12, 2008 at 01:15:31PM -0700, Michael Snyder wrote:
> I guess I'm talking about a separate program that does
> essentially a huge superset of gdbreplay's current functionality,
> using the same input logfile as is currently used by gdbreplay.
>
> In a sense a replacement for gdbreplay, but the existing
> gdbreplay doesn't have to go away, if it serves a purpose.
I've used it for testing... like once every two years. If it took any
more maintenance than it does I'd probably have dumped it by now, but
it's nice and simple :-)
> Yeah, well -- show me an alternative. Gdbserver? Maybe.
There isn't any good GNU alternative that I know of. But RDA isn't
much of an alternative either if you want to make a GNU program.
Just saying.
> This is an extension of a different project I was working on,
> using rda. It just occurred to me that I could make it use
> the log files that are used by gdbreplay, and make them
> suddenly really useful.
Wouldn't you need a completely different sort of log file?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Who uses gdbreplay?
2008-06-12 20:24 ` Daniel Jacobowitz
@ 2008-06-12 20:56 ` Michael Snyder
0 siblings, 0 replies; 14+ messages in thread
From: Michael Snyder @ 2008-06-12 20:56 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: Marc Khouzam, gdb
On Thu, 2008-06-12 at 16:23 -0400, Daniel Jacobowitz wrote:
> On Thu, Jun 12, 2008 at 01:15:31PM -0700, Michael Snyder wrote:
> > I guess I'm talking about a separate program that does
> > essentially a huge superset of gdbreplay's current functionality,
> > using the same input logfile as is currently used by gdbreplay.
> >
> > In a sense a replacement for gdbreplay, but the existing
> > gdbreplay doesn't have to go away, if it serves a purpose.
>
> I've used it for testing... like once every two years. If it took any
> more maintenance than it does I'd probably have dumped it by now, but
> it's nice and simple :-)
>
> > Yeah, well -- show me an alternative. Gdbserver? Maybe.
>
> There isn't any good GNU alternative that I know of. But RDA isn't
> much of an alternative either if you want to make a GNU program.
> Just saying.
>
> > This is an extension of a different project I was working on,
> > using rda. It just occurred to me that I could make it use
> > the log files that are used by gdbreplay, and make them
> > suddenly really useful.
>
> Wouldn't you need a completely different sort of log file?
Here is where I don't want to over-commit myself --
but the whole reason for this thread is that I am
thinking I could use gdbreplay's log file exactly as is
(or perhaps run a post-processor over it).
Currently I am using a completely different log file.
Using gdbreplay's log file is at the idea stage. ;-)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-06-12 20:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-12 18:35 Who uses gdbreplay? Michael Snyder
2008-06-12 18:55 ` Marc Khouzam
2008-06-12 19:07 ` Daniel Jacobowitz
2008-06-12 19:12 ` Michael Snyder
2008-06-12 19:19 ` Daniel Jacobowitz
2008-06-12 19:39 ` Michael Snyder
2008-06-12 19:47 ` Daniel Jacobowitz
2008-06-12 19:57 ` Michael Snyder
2008-06-12 20:06 ` Daniel Jacobowitz
2008-06-12 20:15 ` Michael Snyder
2008-06-12 20:24 ` Daniel Jacobowitz
2008-06-12 20:56 ` Michael Snyder
2008-06-12 19:28 ` Marc Khouzam
2008-06-12 19:44 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox