www.delorie.com/gnu/docs/gdb/gdb_21.html   search  
 
Buy the book!


Debugging with GDB

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5 Your program's working directory

Each time you start your program with run, it inherits its working directory from the current working directory of GDB. The GDB working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working directory in GDB with the cd command.

The GDB working directory also serves as a default for the commands that specify files for GDB to operate on. See section Commands to specify files.

cd directory
Set the GDB working directory to directory.

pwd
Print the GDB working directory.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003