From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6942 invoked by alias); 14 Oct 2003 16:03:51 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6934 invoked from network); 14 Oct 2003 16:03:50 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 14 Oct 2003 16:03:50 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3C5472B89; Tue, 14 Oct 2003 12:03:49 -0400 (EDT) Message-ID: <3F8C1E65.1040702@redhat.com> Date: Tue, 14 Oct 2003 16:03:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy , Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Breakpoint infrastructure cleanups [1/8] - define impl_breakpoint References: <20031008170233.GA9013@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00460.txt.bz2 > Daniel Jacobowitz writes: > >> +/* GDB maintains two groups of breakpoints and related events. One >> + group are the "implementation breakpoints"; these are minimal >> + structures used to manage stopping the program. They map to a specific >> + stop reason (trap at a particular PC, for instance). The other group >> + are "user breakpoints"; these carry higher-level information including >> + source locations and breakpoint conditions. */ GDB users are going to need to know that breakpoints are implemented at two levels, and both of those levels will need to be visible. That's why people are suggesting pairs such as logical/physical, virtual/actual, ... Calling one "user" and the other "impl" or "machine" does not convey that implicit relationship. In fact calling one "user" is saying "hey users, just you stick to this user stuff". ``specific machine-level mechanisms used to stop the program: trap instructions patched into the code ("software breakpoints"), hardware breakpoints, hardware watchpoint registers, and so on.'' This isn't correct. The low-level breakpoints correspond to target-specific and not machine-specific mechanisms. For instance, the target can directly implement relatively abstract breakpoint/watchpoint mechanisms. Eg: per-thread breakpoints where the the underlying machine-specific mechanisms are hidden from GDB. This abstract model is extreemly common in 'debug agent' code, I've seen at least three people being forced to hack around GDB's bogus machine-level assumptions. Andrew