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: Tea <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: Fri, 23 May 2008 10:54:06 +0800
- Subject: Re: GDB record patch 0.1.3.1 for GDB-6.8 release
- References: <daef60380804222316j1b2f10afm77e01ac2618a86ba@mail.gmail.com> <200805221737.50773.pedro@codesourcery.com>
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