From patchwork Tue Jul 7 17:16:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 492443 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 365861402CC for ; Wed, 8 Jul 2015 03:24:48 +1000 (AEST) Received: from localhost ([::1]:59682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWbu-0007ao-9o for incoming@patchwork.ozlabs.org; Tue, 07 Jul 2015 13:24:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWU4-0000js-AG for qemu-devel@nongnu.org; Tue, 07 Jul 2015 13:16:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCWTz-000675-Di for qemu-devel@nongnu.org; Tue, 07 Jul 2015 13:16:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49700 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCWTz-00065C-66 for qemu-devel@nongnu.org; Tue, 07 Jul 2015 13:16:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E117FADD6; Tue, 7 Jul 2015 17:16:34 +0000 (UTC) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 7 Jul 2015 19:16:20 +0200 Message-Id: <1436289389-5403-14-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436289389-5403-1-git-send-email-afaerber@suse.de> References: <1436289389-5403-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 Cc: Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Peter Crosthwaite Subject: [Qemu-devel] [PULL v2 13/22] 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 From: Peter Crosthwaite Use the cpu_set_pc() helper which will take care of CPUClass retrieval for us. Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- gdbstub.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index aa5ba51..92b2f81 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); } static CPUState *find_cpu(uint32_t thread_id)