From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24263 invoked by alias); 8 Oct 2008 22:02:38 -0000 Received: (qmail 24255 invoked by uid 22791); 8 Oct 2008 22:02:38 -0000 X-Spam-Check-By: sourceware.org Received: from az33egw01.freescale.net (HELO az33egw01.freescale.net) (192.88.158.102) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Oct 2008 22:02:03 +0000 Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by az33egw01.freescale.net (8.12.11/az33egw01) with ESMTP id m98M1w8x006364 for ; Wed, 8 Oct 2008 15:01:59 -0700 (MST) Received: from ld0159-tx32 (ld0159-tx32.am.freescale.net [10.82.19.109]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id m98M1vBW022014 for ; Wed, 8 Oct 2008 17:01:58 -0500 (CDT) Date: Wed, 08 Oct 2008 22:02:00 -0000 From: "Anmol P. Paralkar" To: gdb@sourceware.org Subject: Detaching from a remote progam: Why does GDB retain breakpoints? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00029.txt.bz2 Hello, I am trying to understand the 'detach' command and need your help. The documentation says: "After the detach command, gdb is free to connect to another target." So, why does GDB retain breakpoints after detaching from the remote target? The documentation for 'disconnect' indicates that GDB could possibly re-connect to the same remote target so I can see why it makes sense to retain breakpoints on a 'disconnect'. But, with a 'detach', a D-packet is sent and I suppose stubs will then typically relinquish control and have the target proper take over. Should'nt GDB clear out all its target related debug-state on a 'detach'? Thanks, Anmol.