From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14891 invoked by alias); 28 Sep 2003 19:44:15 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14883 invoked from network); 28 Sep 2003 19:44:13 -0000 Received: from unknown (HELO mwinf0102.wanadoo.fr) (193.252.22.30) by sources.redhat.com with SMTP; 28 Sep 2003 19:44:13 -0000 Received: from enst.fr (AFontenayssB-108-1-1-113.w80-11.abo.wanadoo.fr [80.11.179.113]) by mwinf0102.wanadoo.fr (SMTP Server) with ESMTP id D01DD1BE7B55 for ; Sun, 28 Sep 2003 21:44:12 +0200 (CEST) Date: Sun, 28 Sep 2003 20:45:00 -0000 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: process attaching gdb to itself From: Aurelien Chanudet To: gdb@sources.redhat.com Content-Transfer-Encoding: 7bit Message-Id: <5F29455D-F1EC-11D7-B4C2-00039345907E@enst.fr> X-SW-Source: 2003-09/txt/msg00348.txt.bz2 Hi all, How can I have a running process gracefully attach gdb to itself ? I've tried something like : char cmd [256]; sprintf (cmd, "gdb attach %d", getpid ()); system (cmd); which has the desired effect. However, once in gdb, the debugger is stuck in wait4(2) and I cannot find a way to resume execution. Thanks, Aurelien