target-dependent .gdbinit

Andrew Cagney ac131313@redhat.com
Thu Jan 2 15:08:00 GMT 2003


> So I'm thinking I want gdb to read ~/.gdbinit-$target after
> ~/.gdbinit.  Does that seem like a sensible thing to do?
> 
> I'm wary of making target a special case.  My feeling is I'd
> want a single .gdbinit file that has some form of #if for
> target or host or gdb version or other conditions.  But I'm
> not sure that's all that useful.  The added complexity
> doesn't seem to be worth it.
> 
> But target is already a special case sometimes, because
> there's .vxgdbinit and such.

Hmm, something else to delete ....

> Also, behavior like this could be easily synthesized with a
> front-end script that ran gdb with the right -x options.
> The rationale for putting it into gdb: it's standardization.

how about something like:

	(gdb) eval source ~/.gdbinit-$target

?

Andrew




More information about the Gdb mailing list