unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7461: 23.2; Gdb only does tab completion inside Emacs when prompt is (gdb)
@ 2010-11-21 17:45 Rolando Pereira
  2010-11-23  2:01 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Rolando Pereira @ 2010-11-21 17:45 UTC (permalink / raw)
  To: 7461

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-26 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-21 17:45 bug#7461: 23.2; Gdb only does tab completion inside Emacs when prompt is (gdb) Rolando Pereira
2010-11-23  2:01 ` Glenn Morris
2021-08-26 17:47   ` bug#7461: 23.2; gud.el always uses comint-prompt-regexp; things can break if prompt is changed Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).