From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH v2 3/7] x86, ptrace: Ifdef HW_BREAKPOINTS code in ptrace Date: Mon, 10 Mar 2014 10:44:00 -0700 Message-ID: <20140310174400.GA3417@tassilo.jf.intel.com> References: <2741f8cbe6346ef051f7f7b1c39f9a026942b763.1394418994.git.josh@joshtriplett.org> <20140310143522.GB21735@redhat.com> <20140310144254.GC21735@redhat.com> <20140310151527.GB9316@leaf> <20140310174106.GI13302@tassilo.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Suravee Suthikulpanit , Frederic Weisbecker , David Herrmann , Stephane Eranian , linux-kernel@vger.kernel.org, Paul Gortmaker , Paul Mackerras , "H. Peter Anvin" , Thomas Gleixner , x86@kernel.org, Ingo Molnar , oprofile-list@lists.sf.net, Mel Gorman , Arnaldo Carvalho de Melo , Borislav Petkov , Dave Young , Peter Zijlstra , Gleb Natapov , Steven Rostedt , Bin Gao , Matt Fleming , Jacob Shin , Oleg Nesterov , Torsten Kaiser Return-path: Content-Disposition: inline In-Reply-To: <20140310174106.GI13302@tassilo.jf.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: oprofile-list-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Mon, Mar 10, 2014 at 10:41:06AM -0700, Andi Kleen wrote: > > > And in fact, why do we need ptrace_get/set_debugreg(DR6) without HW_BREAKPOINTS? > > > > Good question. Andi? > > dr6 controls single stepping which is useful even without hw/breakpoints. > > Basically gdb will still work for 95+% of all use cases, everyone > not using watch points. Actually thinking about it more gdb should be using PTRACE_SINGLESTEP, not direct access to DR6. So removing it is likely ok (but should verify) -Andi ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech