Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Tea <teawater@gmail.com>,
	 "Michael Snyder" <msnyder@specifix.com>,
	 "Thiago Jung Bauermann" <bauerman@br.ibm.com>
Subject: Re: GDB record patch 0.1.3.1 for GDB-6.8 release
Date: Fri, 23 May 2008 03:52:00 -0000	[thread overview]
Message-ID: <200805221737.50773.pedro@codesourcery.com> (raw)
In-Reply-To: <daef60380804222316j1b2f10afm77e01ac2618a86ba@mail.gmail.com>

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,

@@ -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.

There are probably other things that would become cleaner too.
-- 
Pedro Alves


  parent reply	other threads:[~2008-05-22 16:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23  8:55 Tea
2008-05-20  4:33 ` Thiago Jung Bauermann
2008-05-20  6:38   ` Daniel Jacobowitz
2008-05-20 15:32     ` Tea
2008-05-20 18:51       ` Michael Snyder
2008-05-21 17:26         ` Tea
2008-05-20 15:33   ` Tea
2008-05-21 17:14   ` Tea
2008-05-21 22:01     ` Michael Snyder
2008-05-21 22:16       ` Thiago Jung Bauermann
2008-05-21 22:40         ` Daniel Jacobowitz
2008-05-22 15:08           ` Thiago Jung Bauermann
2008-05-23  2:54             ` Tea
2008-05-23  4:33               ` Michael Snyder
2008-05-23 14:33                 ` Tea
2008-05-23 16:46                   ` Michael Snyder
2008-05-23 18:16                     ` Tea
2008-05-23  3:52 ` Pedro Alves [this message]
2008-05-23 14:31   ` Tea
2008-05-23 21:10     ` Pedro Alves
2008-06-08  6:53       ` teawater
2008-06-09  0:52         ` Pedro Alves
2008-06-09  3:00           ` Daniel Jacobowitz
2008-06-09 13:58             ` Thiago Jung Bauermann
2008-06-10  2:04               ` Michael Snyder
2008-06-09 22:56             ` Michael Snyder
2008-06-11 11:59           ` teawater
2008-06-11 20:03             ` Michael Snyder
2008-06-12 18:10               ` teawater
2008-06-13  6:08                 ` Michael Snyder
2008-06-14  6:24                   ` teawater
2008-06-14 10:31                     ` Michael Snyder
2008-06-15  3:27                       ` teawater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805221737.50773.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@specifix.com \
    --cc=teawater@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox