This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB record patch 0.1.3.1 for GDB-6.8 release
- From: teawater <teawater at gmail dot com>
- To: "Pedro Alves" <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org, "Michael Snyder" <msnyder at specifix dot com>, "Thiago Jung Bauermann" <bauerman at br dot ibm dot com>
- Date: Wed, 11 Jun 2008 15:45:33 +0800
- Subject: Re: GDB record patch 0.1.3.1 for GDB-6.8 release
- References: <daef60380804222316j1b2f10afm77e01ac2618a86ba@mail.gmail.com> <200805231746.23570.pedro@codesourcery.com> <daef60380806072353icb1268fq481e7149ddf49103@mail.gmail.com> <200806090152.00220.pedro@codesourcery.com>
Hi Pedro,
> Don't worry, it's really more about code reorganization, than
> rewriting. :-)
>
> You have two major components in your patch.
>
> 1 - The record/replay component
> 2 - The inferior control in reverse execution mode.
>
> I'm suggesting to split those up, and make them communicate
> with an abstracted interface (target methods). In addition,
> make the record support a layer on top of the
> forward-execution-only debugging targets (of course, defering
> much to the arch support).
>
Michael Snyder is think about it too. He make a rev interface in
before. I will try to use it.
> My idea is that support for reverse execution should be exposed by
> target methods and properties. Say target_can_reverse_p (),
> target_set_execution_direction (...) or similar. For native
> debugging, it might be possible to share most of the code
> between similar targets.
>
> So, in a native linux debugging session, with record activated, the
> target stack would look this (ignoring the thread layer), top to
> bottom:
>
> target | stratum | supports reverse | Notes
> -------------+------------------+--------------------+-------------
> record | record_statum | 1 | (1)
> linux native | process_stratum | 0 | -
> exec target | file_stratum) | 0 | -
>
It's cool. But record only need the support of memory control and
register control from target. So I think most of target can support
record.
For the speed up, I change the code of Linux-Nat. But other target
such as "remote" still support by record.
The record need most support is from GDBARCH. It need add a function
like disassemble function in GDBARCH.
I think make record to be a target is very cool idea. But to implement
the current record. I have already changed a lot of code in GDB core
part. After I make record to a target, I think it maybe will still
have a lot of code in GDB core part. So make it to be a target is very
important?
Thanks,
Hui