From owner-svn-src-head@freebsd.org Fri Sep 16 06:31:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED794BDB77B; Fri, 16 Sep 2016 06:31:11 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B33666; Fri, 16 Sep 2016 06:31:11 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8G6VALE076233; Fri, 16 Sep 2016 06:31:10 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8G6VAwE076232; Fri, 16 Sep 2016 06:31:10 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201609160631.u8G6VAwE076232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Fri, 16 Sep 2016 06:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305864 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 06:31:12 -0000 Author: bde Date: Fri Sep 16 06:31:10 2016 New Revision: 305864 URL: https://svnweb.freebsd.org/changeset/base/305864 Log: Statically initialize the run mode to the one that will become current on first entry. This fixes a spurious "Stepping aborted" message when the first entry is for a breakpoint. Don't reset to the run mode to STEP_NONE when stopping, and remove STEP_NONE. This mode was never really used, except transiently to mis-decide whether to print the message on first entry. Modified: head/sys/ddb/db_run.c Modified: head/sys/ddb/db_run.c ============================================================================== --- head/sys/ddb/db_run.c Fri Sep 16 05:33:08 2016 (r305863) +++ head/sys/ddb/db_run.c Fri Sep 16 06:31:10 2016 (r305864) @@ -48,14 +48,13 @@ __FBSDID("$FreeBSD$"); #include #include -static int db_run_mode; -#define STEP_NONE 0 #define STEP_ONCE 1 #define STEP_RETURN 2 #define STEP_CALLT 3 #define STEP_CONTINUE 4 #define STEP_INVISIBLE 5 #define STEP_COUNT 6 +static int db_run_mode = STEP_CONTINUE; static bool db_sstep_multiple; static bool db_sstep_print; @@ -150,7 +149,6 @@ db_stop_at_pc(int type, int code, bool * #endif if (db_run_mode != STEP_CONTINUE && !IS_SSTEP_TRAP(type, code)) { printf("Stepping aborted\n"); - db_run_mode = STEP_NONE; return (true); } @@ -203,7 +201,6 @@ db_stop_at_pc(int type, int code, bool * return (false); /* continue */ } } - db_run_mode = STEP_NONE; return (true); }