GNU bug report logs -
#7461
23.2; gud.el always uses comint-prompt-regexp; things can break if prompt is changed
Previous Next
Full log
View this message in rfc822 format
When running gdb inside emacs, either by doing M-x gdb or M-x gud-gdb,
if the prompt is set to something that isn't "(gdb)" (or similar, see
the examples below), pressing TAB doesn't do the completion of
commands, functions or variables.
Use the following steps to reproduce the error using emacs -Q:
1) Create a new C file, for example code.c, with the following
contents:
#include <stdio.h>
int main(void) {
printf("Hello World\n");
return 0;
}
2) Compile code using gcc -g code.c -o code
3) Open emacs -Q
4) Start debugging the file using M-x gdb
5) Prompt should be "(gdb) ". Try to type "b ma" and press TAB. It
should expand to "b main".
6) Change gdb's prompt to something else using "set prompt". I changed
it to "gdb> ".
7) Try to type "b ma" and press TAB. It should display on the
minibuffer the message "No completions of ma".
Prompts I've tried where TAB completion still worked:
* "(gdb)"
* " (gdb) " (the prefix whitespace is discarded by gdb,
so this is the same as "(gdb) ")
* "( gdb) "
* "(gdb)_______________________"
* "(GDB) "
* "( GDB) "
Prompts I've tried where TAB completion DIDN'T work:
* "(gdb )"
* "_(gdb)"
* "(gdb "
* "gdb) "
* "( gdb )"
* "" (removed prompt by typing "set prompt" in gdb)
* "gdb> "
* "gdb>"
* "gdb "
* "gdb"
* "<gdb "
* "<gdb"
Emacs version is: GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version
2.16.1)
GDB version is: GNU gdb (GDB) 7.2
This bug report was last modified 3 years and 262 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.