This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB record patch 0.1.3.1 for GDB-6.8 release


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]