Krischu
Krischu

Reputation: 1125

how can I make gdb ignore .gdbinit

I have set up my ~/.gdbinit with some commands for a specific configuration.

Sometimes I would like to start gdb to ignore the .gdbinit.

Is there a mechanism to ignore .gdbinit or override it by another .gdbinit?

Upvotes: 6

Views: 1833

Answers (2)

Simon Sobisch
Simon Sobisch

Reputation: 7297

According to GDB docs, Initialization Files You want to skip your "Home directory early initialization files", to do so start GDB with -nh.

The accepted answer -nx also disables the "System wide initialization files" and the "Local directory initialization file".

Upvotes: 2

j6t
j6t

Reputation: 13507

Run GDB with

gdb -nx

This skips the .gdbinit file processing.

Upvotes: 11

Related Questions