From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29145 invoked by alias); 25 Nov 2009 08:43:20 -0000 Received: (qmail 29132 invoked by uid 22791); 25 Nov 2009 08:43:19 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pw0-f49.google.com (HELO mail-pw0-f49.google.com) (209.85.160.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Nov 2009 08:43:15 +0000 Received: by pwj21 with SMTP id 21so5832356pwj.8 for ; Wed, 25 Nov 2009 00:43:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.21.36 with SMTP id y36mr868424wfi.211.1259138594075; Wed, 25 Nov 2009 00:43:14 -0800 (PST) From: Hui Zhu Date: Wed, 25 Nov 2009 19:19:00 -0000 Message-ID: Subject: A question about gdb script To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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: 2009-11/txt/msg00187.txt.bz2 Hi guys, I got a trouble in line: /* Make sure there is at least one LWP that has been resumed. */ gdb_assert (iterate_over_lwps (ptid, resumed_callback, NULL)); I set a breakpoint in the begin of this function and add commands: silent record c to it. And set a bp in the end of this function and add commands: silent record stop c to it. And I set a bp in internal_error. Then I found the bug. But I found that still have 2 ways not very easy to implement. I know nothing about it. could you help me with it? 1. If I want get the gdb_record.xxx file of each record cycle. It's still hard to me. Because if I add "record save" to commands, each time it will save record entry to same file. Does gdb have some way to handle it? like: $a=1 record save $a $a++ 2. Sometime, I want just record a function, I want: b functon_name commands silent record finish #Maybe we can record save in this line, this is first question. record stop end But when I really do it. I found that gdb stop running after finish. Could you help me with them? Thanks, Hui