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,

At first, thanks for your mail.

On Fri, May 23, 2008 at 12:37 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> Hi Teawater,
>
> I took a really quick glimpse at the patch, and I was wondering if making the
> record target a proper target that sits on top of all the other targets
> wouldn't make more sense?
>
> enum strata
>  {
>    dummy_stratum,              /* The lowest of the low */
>    file_stratum,               /* Executable files, etc */
>    core_stratum,               /* Core dump files */
>    process_stratum,            /* Executing processes */
>    thread_stratum,             /* Executing threads */
>
>    record_stratum              /* Support reverse debugging */
>  };
>
> Then, things could be a bit more encapsulated.  e.g., this wouldn't be needed,
Sorry, I am not very clear this part of code. I tried, but ...

>
> @@ -1026,10 +1047,18 @@ wait_for_inferior (int treat_exec_as_sig
>
>    while (1)
>      {
> -      if (deprecated_target_wait_hook)
> -       ecs->ptid = deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp);
> +      if (record_list && (record_list->next || gdb_is_reverse))
> +       {
> +         ecs->ptid = record_wait (current_gdbarch, ecs->waiton_ptid,
> ecs->wp);
> +       }
>       else
> -       ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp);
> +       {
> +         if (deprecated_target_wait_hook)
> +           ecs->ptid =
> +             deprecated_target_wait_hook (ecs->waiton_ptid, ecs->wp);
> +         else
> +           ecs->ptid = target_wait (ecs->waiton_ptid, ecs->wp);
> +       }
>
> Those new checks could be done inside record_wait, and if eval as false,
> defer to the target beneath.
I am not very clear your meaning. Could you please write a example for me?


Thanks,
teawater


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