Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 2017 11:45:42 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r322437 - in head/sys/arm64: arm64 include
Message-ID:  <2695757.2orfonibFk@ralph.baldwin.cx>
In-Reply-To: <201708121842.v7CIgtJA021488@repo.freebsd.org>
References:  <201708121842.v7CIgtJA021488@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, August 12, 2017 06:42:55 PM John Baldwin wrote:
> Author: jhb
> Date: Sat Aug 12 18:42:54 2017
> New Revision: 322437
> URL: https://svnweb.freebsd.org/changeset/base/322437
> 
> Log:
>   Reliably enable debug exceptions on all CPUs.
>   
>   Previously, debug exceptions were only enabled on the boot CPU if
>   DDB was enabled in the dbg_monitor_init() function.  APs also called
>   this function, but since mp_machdep.c doesn't include opt_ddb.h, the
>   APs ended up calling an empty stub defined in <machine/debug_monitor.h>
>   instead of the real function.  Also, if DDB was not enabled in the kernel,
>   the boot CPU would not enable debug exceptions.
>   
>   Fix this by adding a new dbg_init() function that always clears the OS
>   lock to enable debug exceptions which the boot CPU and the APs call.
>   This function also calls dbg_monitor_init() to enable hardware breakpoints
>   from DDB on all CPUs if DDB is enabled.  Eventually base support for
>   hardware breakpoints/watchpoints will need to move out of the DDB-only
>   debug_monitor.c for use by userland debuggers.
>   
>   Reviewed by:	andrew
>   Differential Revision:	https://reviews.freebsd.org/D12001

In particular, this fixes single stepping of userland processes when the
process is running on a CPU other than CPU 0.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2695757.2orfonibFk>