From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 906 invoked by alias); 14 Jul 2014 19:13:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 839 invoked by uid 89); 14 Jul 2014 19:13:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f202.google.com Received: from mail-vc0-f202.google.com (HELO mail-vc0-f202.google.com) (209.85.220.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 14 Jul 2014 19:13:10 +0000 Received: by mail-vc0-f202.google.com with SMTP id id10so792172vcb.1 for ; Mon, 14 Jul 2014 12:13:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=Cb+QOiwD6fh+hMjmhnkJpLylTs+t0Vj9ksmtGbgDtkw=; b=AGXlDV5CEOSas7I7j9lptziuaqc0sQ5NZDPJ2nAbl1xCjM6spj8ysyyVr5+gy3t8pt sHzJF5IBhcqHNerNn6WnYJZFU0rcAJbbX/6YFBw34YjM0Re+8rC56ej3DtyOXI4cuno8 DJXD+zXkIZ7hRQ+O2Gv7LqGv3NMyqe6/a4QikPTP+CLEdupr1rfZR4BfrnIMWPuahGCf 0PFhGaRUVhdLCEo9gSOusPgMhOjm1elBtpOk5A9FGmdPFZqsaS5EIPNQXYI0PRTgX9FX lkFEcXqKRaPTCvqUNpWW7TIfgiFQ7818k1JC1S6F5YvR2UoWZ/bAzljKp5jfwLZnwexO tdtA== X-Gm-Message-State: ALoCoQnSjg+C+BGcF6Eian+EWqfIb9PWkI5JxkzWlzcTlPfNrVNfy3naLpB9BsdlvpPUJ5cbyfNZ X-Received: by 10.58.132.66 with SMTP id os2mr9092018veb.15.1405365188617; Mon, 14 Jul 2014 12:13:08 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id c50si801302yhl.7.2014.07.14.12.13.08 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jul 2014 12:13:08 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 138A831C145; Mon, 14 Jul 2014 12:13:07 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21444.11203.526875.132980@ruffy.mtv.corp.google.com> Date: Mon, 14 Jul 2014 19:17:00 -0000 To: Gary Benson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 11/15] More target unification In-Reply-To: <1404902255-11101-12-git-send-email-gbenson@redhat.com> References: <1404902255-11101-1-git-send-email-gbenson@redhat.com> <1404902255-11101-12-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00353.txt.bz2 Gary Benson writes: > This unifies a few more top-level target functions -- target_resume, > target_wait, and target_stop -- and the declaration of the variable > "non_stop". This follows the usual pattern, where clients of "common" > are expected to define the objects appropriately, thus simplifying > common/agent.c a bit more. > > gdb/ > 2014-07-09 Tom Tromey > > * target/target.h (target_resume, target_wait, target_stop) > (non_stop): Moved from target.h. > * target.h (target_resume, target_wait, target_stop, non_stop): > Move to target/target.h. > * common/agent.c (agent_run_command): Always use target_resume, > target_stop, and target_wait. > > gdb/gdbserver/ > 2014-07-09 Tom Tromey > > * target.c (target_wait, target_stop, target_resume): New > functions. > [...] > > diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c > index 44e1e11..f93163e 100644 > --- a/gdb/gdbserver/target.c > +++ b/gdb/gdbserver/target.c > @@ -134,6 +134,40 @@ mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, > return ret; > } > > +/* See target/target.h. */ > + > +ptid_t > +target_wait (ptid_t ptid, struct target_waitstatus *status, int options) > +{ > + return mywait (ptid, status, options, 0); > +} > + > +/* See target/target.h. */ > + > +void > +target_stop (ptid_t ptid) > +{ > + struct thread_resume resume_info; > + > + resume_info.thread = ptid; > + resume_info.kind = resume_stop; > + resume_info.sig = GDB_SIGNAL_0; > + (*the_target->resume) (&resume_info, 1); > +} > + > +/* See target/target.h. */ > + > +void > +target_resume (ptid_t ptid, int step, enum gdb_signal signal) > +{ > + struct thread_resume resume_info; > + > + resume_info.thread = ptid; > + resume_info.kind = step ? resume_step : resume_continue; > + resume_info.sig = GDB_SIGNAL_0; > + (*the_target->resume) (&resume_info, 1); > +} I'm guessing the ignoring of signal is an oversight, right?