From patchwork Mon Jun 15 03:48:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 484135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 34A1F140216 for ; Mon, 15 Jun 2015 13:50:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=jyanctsw; dkim-atps=neutral Received: from localhost ([::1]:60269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4LPu-0004fL-7v for incoming@patchwork.ozlabs.org; Sun, 14 Jun 2015 23:50:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4LOH-0001Zs-K0 for qemu-devel@nongnu.org; Sun, 14 Jun 2015 23:48:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4LOG-0002JL-Mm for qemu-devel@nongnu.org; Sun, 14 Jun 2015 23:48:53 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:33756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4LOG-0002IU-GF for qemu-devel@nongnu.org; Sun, 14 Jun 2015 23:48:52 -0400 Received: by padev16 with SMTP id ev16so57005410pad.0 for ; Sun, 14 Jun 2015 20:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=rymRgq6IY1P8sx+wio1Bj+SAQJsRvhvo3fzMuLZH+CU=; b=jyanctswxwwgGFmtEACD8Xk/lIeuzgejmMzPTJBapWmq9/NncgZ/vza0q8Y1hfjdOv FzzH7Fq/bhI+vxc83OM+xdgCWLNtJXT0K8aUOFZxMAJImRWR8sPZ6JuJDEyZpLbV4ufy LmhefnThHChATTeciupnQ23mI11TwVwt8YK7jTaEEiymo0pfvPJzKSb169b/iclmsmPF Egtjs7NwGUf1Ts6NKCe9hmBAlx5yiEK6mLMR8j+pHYMjesxGUS4+D9gYPXQlU/QLKFYm fAvEzfCPe8XDNV2LfmexDPKkuosSXYxJ2do/K9Fq0JIEnJa7C47KM68XoiSCHsWOk4mS OJFg== X-Received: by 10.70.33.67 with SMTP id p3mr44053950pdi.126.1434340131505; Sun, 14 Jun 2015 20:48:51 -0700 (PDT) Received: from pcrost-laptop.hsd1.ca.comcast.net (c-73-15-58-35.hsd1.ca.comcast.net. [73.15.58.35]) by mx.google.com with ESMTPSA id jz10sm10502999pbc.48.2015.06.14.20.48.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Jun 2015 20:48:50 -0700 (PDT) From: Peter Crosthwaite X-Google-Original-From: Peter Crosthwaite To: qemu-devel@nongnu.org Date: Sun, 14 Jun 2015 20:48:29 -0700 Message-Id: <00c96d447252bc1333e14e626611f4f5a58f9bf5.1434339500.git.crosthwaite.peter@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::234 Cc: peter.maydell@linaro.org, Peter Crosthwaite , afaerber@suse.de, edgar.iglesias@gmail.com Subject: [Qemu-devel] [PATCH 2/5] gdbstub: Use cpu_set_pc helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use the cpu_set_pc helper which will take care of CPUClass retrieval for us. Signed-off-by: Peter Crosthwaite --- gdbstub.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 75563db..ceb60ac 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -754,12 +754,9 @@ static void gdb_breakpoint_remove_all(void) static void gdb_set_cpu_pc(GDBState *s, target_ulong pc) { CPUState *cpu = s->c_cpu; - CPUClass *cc = CPU_GET_CLASS(cpu); cpu_synchronize_state(cpu); - if (cc->set_pc) { - cc->set_pc(cpu, pc); - } + cpu_set_pc(cpu, pc, NULL); } static CPUState *find_cpu(uint32_t thread_id)