The following solves a number of problems with the mi -environment commands. For starters, each command now has an mi cmd wrapper so arguments may use the syntax of adding double-quotes to handle extraneous characters such as spaces. The -environment-pwd command now lists the output in mi syntax: e.g. -environment-pwd ^done,cwd="...." The -environment-directory command has been changed to output in mi format. It also has been changed to allow for no arguments being passed. If no arguments are passed, it behaves like the gdb dir command and resets the source search path to the default, however, no confirmation query is performed. If an empty string "" is passed, it is ignored so this can be used to display the current search path without modifying it. e.g. -environment-directory /usr/bin /usr/local/bin ^done,source-path="/usr/bin:/usr/local/bin:$cdir:$cwd" The -environment-path command has been changed to output in mi format. It also has been changed to allow for no arguments being passed. When no arguments are passed, the current object search path is displayed. e.g. -environment-path ^done,path="....." For mi1 or below, the previous behavior is preserved by rerouting the commands to their old cli counterparts. Eli, I have split the doc changes into 741doc.patch for your convenience. Let me know if there are any problems. gdb/mi/ChangeLog: 2002-10-09 Jeff Johnston * mi-cmds.c (-environment-directory) Change to use mi_cmd_env_dir, (-environment-cd): Change to use mi_cmd_env_cd,. (-environment-pwd): Change to use mi_cmd_env_pwd. (-environment-path): Change to use mi_cmd_env_path. * mi-cmds.h (mi_cmd_env_cd, mi_cmd_env_dir): New prototypes. (mi_cmd_env_path, mi_cmd_env_pwd): Ditto. * mi-cmd-env.c: New file. Part of fix for PR gdb/741. * gdbmi.texinfo (environment-cd): Update output and example. (environment-pwd): Ditto. (environment-dir): Update output, description, and examples. (environment-path): Ditto. gdb/testsuite/gdb.mi/ChangeLog: 2002-10-09 Jeff Johnston * mi-basics.exp: Change tests for -environment-directory. Also add tests for -environment-cd and -environment-pwd. Part of fix for PR gdb/741. Approved, comments? -- Jeff J.