Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kris Warkentin <kewarken@qnx.com>
To: Atul Talesara <atul.talesara@nevisnetworks.com>
Cc: Hareesh Nagarajan <hnagaraj@cs.uic.edu>, GDB <gdb@sources.redhat.com>
Subject: Re: Is it possible to save breakpoints to a file?
Date: Thu, 10 Mar 2005 15:08:00 -0000	[thread overview]
Message-ID: <423062AC.9020106@qnx.com> (raw)
In-Reply-To: <7F17177AC9AC2F4CB4A1A33C936D038D07240F@nevismail01.pune.nevisnetworks.com>

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.
>
>---------------------------------------------------------- 
>  
>


  reply	other threads:[~2005-03-10 15:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-10 10:52 Atul Talesara
2005-03-10 15:08 ` Kris Warkentin [this message]
2005-03-10 15:52 ` Dave Korn
2005-03-10 16:08   ` RT
2005-03-11  1:28     ` Tom Tromey
2005-03-12 11:29       ` RT
2005-03-12 11:58         ` Russell Shaw
2005-03-12 12:13           ` RT
2005-03-12 19:39         ` Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2005-03-13  5:03 Paul Schlie
2005-03-10  7:07 Hareesh Nagarajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=423062AC.9020106@qnx.com \
    --to=kewarken@qnx.com \
    --cc=atul.talesara@nevisnetworks.com \
    --cc=gdb@sources.redhat.com \
    --cc=hnagaraj@cs.uic.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox