From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14872 invoked by alias); 10 Mar 2005 15:08:02 -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 13790 invoked from network); 10 Mar 2005 15:07:37 -0000 Received: from unknown (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 10 Mar 2005 15:07:37 -0000 Received: from [10.12.1.181] (dhcpa181.ott.qnx.com [10.12.1.181]) by nimbus.ott.qnx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id GG9HJN0K; Thu, 10 Mar 2005 10:07:36 -0500 Message-ID: <423062AC.9020106@qnx.com> Date: Thu, 10 Mar 2005 15:08:00 -0000 From: Kris Warkentin User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: Atul Talesara CC: Hareesh Nagarajan , GDB Subject: Re: Is it possible to save breakpoints to a file? References: <7F17177AC9AC2F4CB4A1A33C936D038D07240F@nevismail01.pune.nevisnetworks.com> In-Reply-To: <7F17177AC9AC2F4CB4A1A33C936D038D07240F@nevismail01.pune.nevisnetworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00104.txt.bz2 Another possiblity is to use the logging abilities and define your own. define save-breaks set logging file $arg0 set logging on info breakpoints set logging off end Unfortunately this doesn't give you something that you can load later so you'd have to write a little bit of an awk script to process it into an init file. cheers, Kris Atul Talesara wrote: >>Is it possible to save all breakpoints that one >>sets to a file, so that >>we can reload the breakpoints set during the next >>debug run? >> >> >Well, though not exactly the same ... this might >solve your problem. You can have a plain text >file that can list all the breakpoints you want >to put. Ex: >$ cat breakpoints >break code_file_01.c : 515 >break code_file_02.c : 5 >break code_file_03.c : 201 > >And then you can source this file to gdb as: >(gdb) source breakpoints > >In fact you can have *any* command you wish in the >sourced file. If you put all these in '.gdbinit' >file then gdb will automatically source this on start up! >Hope this addresses your need. > >Regards, >Atul >http://the-shaolin.blogspot.com/ >---------------------------------------------------------- >You can tell more about a person by what he says about >others than you can by what others say about him. > >---------------------------------------------------------- > >