Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

debugger plugin feature request about the initial command of GDB

<< < (3/5) > >>

xunxun:
I have an another method.
Create a new file named ".gdbinit" at the gdb.exe directory.
Content:

--- Code: ---set data-directory E:\MyPack\MinGW\share\gdb

--- End code ---
Then gdb will use this data directory.

ironhead:

--- Quote from: xunxun1982 on August 09, 2011, 01:17:01 pm ---I have an another method.
Create a new file named ".gdbinit" at the gdb.exe directory.
Content:

--- Code: ---set data-directory E:\MyPack\MinGW\share\gdb

--- End code ---
Then gdb will use this data directory.

--- End quote ---

Unfortunately this won't help due to how gdb is started within C::B.  As per ollydbg's original post, gdb is started with "-nx" meaning .gdbinit is not sourced.

xunxun:

--- Quote from: ironhead on August 09, 2011, 02:13:58 pm ---
--- Quote from: xunxun1982 on August 09, 2011, 01:17:01 pm ---I have an another method.
Create a new file named ".gdbinit" at the gdb.exe directory.
Content:

--- Code: ---set data-directory E:\MyPack\MinGW\share\gdb

--- End code ---
Then gdb will use this data directory.

--- End quote ---

Unfortunately this won't help due to how gdb is started within C::B.  As per ollydbg's original post, gdb is started with "-nx" meaning .gdbinit is not sourced.



--- End quote ---
so we can use the command :
gdb -ex "set data-directory e:\mypack\mingw\share\gdb"

but I try to use "info pretty-printer", and this doesn't work.

xunxun:

--- Quote from: xunxun1982 on August 09, 2011, 02:31:23 pm ---
--- Quote from: ironhead on August 09, 2011, 02:13:58 pm ---
--- Quote from: xunxun1982 on August 09, 2011, 01:17:01 pm ---I have an another method.
Create a new file named ".gdbinit" at the gdb.exe directory.
Content:

--- Code: ---set data-directory E:\MyPack\MinGW\share\gdb

--- End code ---
Then gdb will use this data directory.

--- End quote ---

Unfortunately this won't help due to how gdb is started within C::B.  As per ollydbg's original post, gdb is started with "-nx" meaning .gdbinit is not sourced.



--- End quote ---
so we can use the command :
gdb -ex "set data-directory e:\mypack\mingw\share\gdb"

but I try to use "info pretty-printer", and this doesn't work.

--- End quote ---
I test this, this method can modify the gdb's data directory, but not python's.

oBFusCATed:

--- Quote from: ironhead on August 09, 2011, 02:13:58 pm ---Unfortunately this won't help due to how gdb is started within C::B.  As per ollydbg's original post, gdb is started with "-nx" meaning .gdbinit is not sourced.

--- End quote ---
You can source ~/.gdbinit manually.
You can even import the pretty printers manually.
This is what I was doing not long ago.


--- Quote from: xunxun1982 on August 09, 2011, 02:31:23 pm ---so we can use the command :
gdb -ex "set data-directory e:\mypack\mingw\share\gdb"

--- End quote ---
Why would you do this instead of passing --data-dir?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version