Solved

How to save breakpoints and tracepoints in gdb?

Posted on 2008-06-24
3
1,957 Views
Last Modified: 2013-12-12
I am using gdb. I am not able to use ddd because my connection is slow and not able to run xterm. i am not able to use emacs, because I have not learned it.

Now it is painful to set up my traces and breaks every time.

Is there a way to save all this work for next time I run the debug?

0
Comment
Question by:EmadGirgis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 14

Expert Comment

by:agriesser
ID: 21864311
There is no way known to me to save breakpoints and the like using the command line interface or the text user interface in gdb.
You can, though, create a .gdbinit file (see man gdb) and store the breakpoint commands in there (although I don't think that this is really a good idea, as breakpoints might change when the program evolves, etc.).

So I think you're out of luck here, even if this is not the answer you wanted to hear.
0
 
LVL 14

Accepted Solution

by:
agriesser earned 500 total points
ID: 21864337
Forgot to add:
Tracepoints can be saved using the "save-tracepoints /path/to/file" command. If you want to load the tracepoints again, use the "source /path/to/file" command.

Another idea to make life easier with not being able to save breakpoints:
You can turn history saving on:

(gdb) set history save on

That way, gdb will save the command history into a file and in future invocations of gdb, you can cycle through your previous commands (breakpoint definitions, etc.).

To make this change permanent, you need to add "set history save on" to your gdbinit file.
0
 
LVL 14

Expert Comment

by:agriesser
ID: 21905339
You should definetly read http://www.experts-exchange.com/help.jsp, especially the section "What is the right grade to give?".
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Introduction to Processes
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question