This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Gdb] 'intelligent' history in gdb


On Fri, Jul 22, 2005 at 11:30:05AM -0400, Dillabaugh, Craig wrote:
> Hi Ed,
> I can't help with your first request, but there is a feature that might be a
> partial solution to you second problem.  You can create a file that includes
> a set of gdb commands and then use the 'source' command to load these
> commands into your current GDB session.  This wouldn't be automated, but it
> would allow you to create a gdb script for a certain executable that you
> load at the time you run that executable.
> 
> Good luck,
> Craig

Thanks for the pointer, but I'm aware of the source command.. And you have to:

	a) manage multiple files, one per project and keep memory of which
           source file goes with which.
	b) type these commands longhand into a flat file
	c) debug these commands

In short, relying on manual dot files is probably about 100 times less
efficient than doing it automatically. You are essentially making a 
subproject for every single project that you are working on - when these
are a small group of monolithic, larger projects the overhead (one gdbinit 
per project) is fine; it becomes more cumbersome when you have
lots of small, rapidly developed projects, or are debugging one of a hundred
projects provided by other, third parties.


Its not as if what I'm envisioning is without precedent; all the 
shells pretty much have automated history management built into them, and its
really kind of cool to use, say tcsh, and have it slowly grow more intelligent
and responsive as you use it.

Anyways, if you don't mind, I'm going to post this the gdb mailing list 
so it can get further discussion. 

Ed


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]