Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 73050

Summary: completion: error during 'gdb `which app` core'
Product: Gentoo Linux Reporter: Panard <panard>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED WONTFIX    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Panard 2004-12-01 10:41:36 UTC
$ ulimit -c unlimited
$ someapp
Segmentation fault (core dumped)
$ gdb `which someapp` c<TAB>awk: cmd. line:1: {if ($1 ~ /^`which
awk: cmd. line:1:            ^ unterminated regexp
awk: cmd. line:2: {if ($1 ~ /^`which
awk: cmd. line:2:                   ^ unexpected newline or end of string
ore

Bash completes core correctly but seems to have problems with `which someapp`

Works well with other commands like
$ ls `which someapp` c<TAB>ore
/usr/bin/someapp  core


Reproducible: Always
Steps to Reproduce:





$ qpkg -I -nc -v bash 
app-shells/bash-completion-config-0.7 
app-shells/bash-3.0-r7 
app-shells/bash-completion-20041017-r2
Comment 1 Aaron Walker (RETIRED) gentoo-dev 2004-12-03 15:09:48 UTC
It does this because the gdb completion function is expecting just the program name (it automatically prepends the path), and using a subshell confuses awk.

If you are going to use gdb completion, do not use a subshell and which, but rather (to follow your example):

gdb somea<TAB> co<TAB>

In order for the executable to be in gdb's completion list it would need to be executable and in the current path (same requirements for which).