FAQs during vimgdb debugging [Question 1: when running the GDB command, the prompt & quot; unabletoreadfromgdbpseudo dotty & quot;?] When some readers attempt to execute the GDB command, the above prompt appears. This problem occurs at www.2cto.com because gdbp is not correctly set... vimgdb for debugging and troubleshooting [Problem 1: when running the GDB command, the system prompts "unable to read from GDB pudo tty "?] When a reader tries to execute the GDB command, the above prompt is displayed. This problem occurs at www.2cto.com because the gdbprg variable is not correctly set. Use the following command to set the location of the GDB program to solve the problem :: set gdbprg =/path/to/gdb replace the above/path/to/gdb with the path of the GDB program on your computer. You can add this statement to your vimrc so that this variable is automatically set every time you start vi. [Question 2: "GDB busy: command discarded, please try again "?] When your program needs to use functions such as scanf () or getchar () to read user input, you may see the following prompt: www.2cto.com [quote] GDB busy: command discarded, please try again [/quote] prompts that your GDB is waiting for user input, so it cannot respond to other GDB commands you have entered. When using vimgdb, if your program needs to read user input, you must use the GDB tty command or run to redirect the standard input of the program. First, open a terminal (xterm/rxvt/urxvt/putty /...), Enter the command tty: www.2cto.com $ tty/dev/pts/17 in this terminal to display the device file name used by this terminal. After obtaining the device file name, you can redirect the program's standard input and output to this terminal, and enter the following command in GDB: tty/dev/pts/17 after the command is executed, the standard input/output of the program is redirected to/dev/pts/17 () or the getchar () function, switch to the terminal and enter the specified parameter, and press enter to continue the program execution. [Question 3: Can vimgdb be used in windows?] Vimgdb cannot be used in windows. However, you can use the Clewn or Pyclewn provided by the author. These two programs can be used in Vim/Gvim of Windows. Www.2cto.com [Question 4: Why is the vimgdb command window not displayed After spaces?] First, make sure that the key definition file of vimgdb exists. Run the following command: set runtimepath? Check all directories listed in this command. if any directory contains the macros/gdb_mappings.vim file, your key ing file already exists. If the file is not found, find the command in the vimgdb directory and copy it to any of the preceding directories. Next, load the key binding of vimgdb with the following command: run macros/gdb_mappings.vim now, you should be able to use the shortcut key defined by vimgdb.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service