Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to put .gdbinit in Windows?

And should it be called .gdbinit or gdb.ini?

I thought that I would try this file.

I am testing with Vectorcast, which uses MinGw. I copied the file with both names (.gdbinit and gdb.ini) to both the Vectorcast directory and it's MinGW bin directory, where gdb.exe is, as I was unsure which is the current working directory, but don't see anything which I would expect from that file.

So, where should I put it, and what should I call it?

like image 371
Mawg says reinstate Monica Avatar asked Jul 13 '18 11:07

Mawg says reinstate Monica


People also ask

Where do I put .gdbinit files?

gdbinit - put it in your home directory. Now every time gdb starts it will execute the commands in this file. ". gdbinit" is a file you can drop in your home directory that gdb will parse when gdb launches, either from the command line or from within Xcode.

What is. gdbinit file?

GDB User Initialization File The user initialization file contains commands that are executed upon the startup of GDB. It is located in your home directory under the path: ~/. gdbinit.


1 Answers

You should put it into your $HOME directory or into current directory, see How do I load .gdbinit on gdb startup?.

You can know your home directory from gdb shell with either

(gdb) show environment HOME

or

(gdb) shell echo $HOME

You can know current directory with

(gdb) shell pwd

And should it be called .gdbini or gdb.ini?

No, it should be called .gdbinit.

like image 50
ks1322 Avatar answered Sep 23 '22 04:09

ks1322