target-dependent .gdbinit

Andrew Cagney ac131313@redhat.com
Thu Jan 2 19:13:00 GMT 2003


> Andrew Cagney <ac131313@redhat.com>:
> 
>> how about something like:
>> 	(gdb) eval source ~/.gdbinit-$target
> 
> 
> well, there's still the standardization point.  if gdb did
> this automatically, then people could rely on that behavior
> in arbitrary installations.  otherwise, people will
> synthesize this behavior themselves in different ways.  one
> installation might have .gdb.$target, another
> .gdbinit.$target, or .vxgdbinit, etc.

It should be kept simple.  A GDB install should only read `.gdbinit' 
(the vx hacks, I think, should just go).  A user is then free to 
customize their .gdbinit to do things like read .gdbinit-$target, or 
even conditionally interpret sections of the init file.

If GDB's scripting language isn't powerful enough to handle this then 
the scripting language needs to be fixed.

Andrew




More information about the Gdb mailing list