From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9963 invoked by alias); 1 Nov 2004 11:04:00 -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 9942 invoked from network); 1 Nov 2004 11:03:59 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.197) by sourceware.org with SMTP; 1 Nov 2004 11:03:59 -0000 Received: by rproxy.gmail.com with SMTP id 74so118003rnk for ; Mon, 01 Nov 2004 03:03:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=cKhc7n/83cREG7S2FG4qBXAuUdWp8Kr2/IP+4LeVZgnqNx3VMFwnSZGERvvQxfpDvzX/4+XMaoUOg8W2bv3G3etPJ33mXUyzJ0DgHUURGzlPnT2dKgaGAlvzCZFT44Q1G4Rc4D4FeJN0fDRgOOvIaKP1VBvAOV5FTodEPbMuEPM= Received: by 10.38.149.56 with SMTP id w56mr230685rnd; Mon, 01 Nov 2004 03:03:58 -0800 (PST) Received: by 10.38.181.17 with HTTP; Mon, 1 Nov 2004 03:03:58 -0800 (PST) Message-ID: Date: Mon, 01 Nov 2004 11:04:00 -0000 From: Devrim Erdem Reply-To: Devrim Erdem To: gdb@sources.redhat.com Subject: Attaching and inspecting crash with gdb Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00000.txt.bz2 Hello, Classic problem. Customer uses software heavily. Software crashes from time to time. No core dumps. Is there a way of attaching and application and ask gdb to write a core dump ( or any kind of dump of data ) which I could later load in gdb to debug the problem remotely. If this is not possible, I will need to implement my current solution. The current not so elegant way: ============================= In my crash crash handler, I simply run a small python script which attaches gdb to the currently crashed application. So far I can use the command line argument "--command" to specify commands like printing the current stack trace. But I need more information about the crash such as the value of data at the point of crash. I would like to be able to tell gdb to do: For each thread For each frame ( n to 0 ) print values of all data of the current frame Then the user sends this text to me and then I can try to figure out the problem. But at the moment I can not tell gdb to do a "for" loop for threads and frames. Is this possible or is there another way of getting the same kind of information. Thanks in advance, Devrim.