Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73050 - completion: error during 'gdb `which app` core'
Summary: completion: error during 'gdb `which app` core'
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Shell Tools Herd Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-01 10:41 UTC by Panard
Modified: 2004-12-03 15:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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).