From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7457 invoked by alias); 28 Oct 2012 22:28:39 -0000 Received: (qmail 7449 invoked by uid 22791); 28 Oct 2012 22:28:38 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from g6t0185.atlanta.hp.com (HELO g6t0185.atlanta.hp.com) (15.193.32.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 28 Oct 2012 22:28:34 +0000 Received: from G6W1798G.americas.hpqcorp.net (g6w1798g.atlanta.hp.com [16.230.17.175]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by g6t0185.atlanta.hp.com (Postfix) with ESMTPS id 18C6D24043 for ; Sun, 28 Oct 2012 22:28:34 +0000 (UTC) Received: from G6W2546G.americas.hpqcorp.net (16.205.233.31) by G6W1798G.americas.hpqcorp.net (16.230.17.175) with Microsoft SMTP Server (TLS) id 14.2.283.4; Sun, 28 Oct 2012 22:28:33 +0000 Received: from G6W2492.americas.hpqcorp.net ([169.254.6.27]) by G6W2546G.americas.hpqcorp.net ([16.205.233.31]) with mapi id 14.02.0283.004; Sun, 28 Oct 2012 22:28:33 +0000 From: "Maucci, Cyrille" To: "gdb@sourceware.org" CC: "Maucci, Cyrille" Subject: working around batch mode command errors Date: Sun, 28 Oct 2012 22:28:00 -0000 Message-ID: <7D0928B9A8397D4B9E2F9E5FFFB8D860027BED37@G6W2492.americas.hpqcorp.net> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2012-10/txt/msg00109.txt.bz2 Hello gdb'ers, I've got a batch script that is meant to be invoked on customer production = systems, should a process dump a core file. The goal of this script is to q= uickly and easily collect and send to support people very basic information= about the coredump, because : 1- that is often painful and slow to get the core file itself (and dependan= t libs) out of the system for in depth analysis. 2- most of the time information contained in the script output is enough fo= r the source code owners to understand what the problem is. So the script looks like this: set pagination off info sharedlibrary info threads up 128 info args info locals frame 0 info source info args info locals info frame info all-registers print *this thread apply all bt thread apply all bt full quit One of the problem I have is that when frame 0 is not C++ code, "print *thi= s" fails and the script aborts with the following error Error in sourced command file: No symbol "this" in current context. And therefore all subsequent commands are not executed. I wanted to know if there would be any possiblity to avoid halting on such = errors. An aside question would be is there any built-in commands allowing to do so= mething like for each frame do info source info args info locals info frame info all-registers print *this done=20=20 Thanks a bunch for your help ++Cyrille