Bug 18226 - completion of extended-identifiers
Summary: completion of extended-identifiers
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-09 18:13 UTC by matt rice
Modified: 2018-05-22 22:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matt rice 2015-04-09 18:13:24 UTC
when using an input string containing a unicode character, tab completion and the complete command complete to non-existent symbols

echo "void foo\u0f00(){} void main(){}" | gcc -g --std c99 -fextended-identifiers -x c -; gdb -quiet  ./a.out -batch -ex 'complete b foo' -ex 'complete b fooༀ'

The first complete works fine (because the input contains no extended-identifiers)
b fooༀ

the 2nd completion starts appending all symbols to the input string
b fooༀ_DYNAMIC
b fooༀ_GLOBAL_OFFSET_TABLE_
<snip>
b fooༀfooༀ
Comment 1 matt rice 2015-04-09 18:44:50 UTC
The same thing happens with filenames when using the break completer,to complete filenames, but works OK for the 'file' completer.

echo "void main(){}" >fooༀ.c; gcc -g --std c99 -fextended-identifiers -x c fooༀ.c; gdb -quiet  ./a.out -batch -ex 'complete file fooༀ' -ex 'complete break fooༀ'
file fooༀ.c
break fooༀ.c
break fooༀ_DYNAMIC
break fooༀ_GLOBAL_OFFSET_TABLE_
<snip>
Comment 2 Pedro Alves 2018-05-22 16:59:21 UTC
This all seems to work for me in current master.  Can you confirm?
Comment 3 matt rice 2018-05-22 22:35:21 UTC
Can confirm, didn't figure out what fixed it though, anyhow marking resolved.
(sorry, should have tested earlier when referencing this bug)