From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maciej Kalisiak To: gdb@sourceware.cygnus.com Subject: problem with completion and C++ mangling Date: Tue, 28 Nov 2000 11:18:00 -0000 Message-id: <20001128141830.A2481@khazad-dum> X-SW-Source: 2000-11/msg00264.html Hello all, I'm new to the list so please forgive me if this was already discussed, but I'm extremely frustrated with this persistent problem: when doing function completion for a "break" command in a C++ program, the C++ demangling is not used, and thus the completion becomes useless. Let me give you an example ("" indicates where I press the Tab key): [khazad-dum !28 L2 ~/src/dmg] % gdb dmg GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (gdb) break Tree TreeExplorer TreeExplorer type_info function TreeExplorer type_info node TreeExplorer virtual table TreeExplorer::TreeExplorer(DMGraph *, unsigned short, unsigned short) TreeExplorer::add_node_to_ann(node) TreeExplorer::ann_search(NilXState const &) TreeExplorer::build_nodes_on_traj(node, CtrlInp const &, vector > const &) TreeExplorer::develop_node(node) TreeExplorer::execute(void) TreeExplorer::make_ann_tree(void) TreeExplorer::pick_node(void) TreeExplorer::pick_traj_len(void) TreeExplorer::reconnect(node, CtrlInp const &, vector > const &, node) TreeExplorer::search_k(void) TreeExplorer::spawn(node, CtrlInp const &, vector > const &) TreeExplorer::update_ann_tree(void) TreeExplorer::~TreeExplorer(void) (gdb) break TreeExplorer::bui build__11TrajBuilderRt6vector2Z5StateZt9allocator1Z5StateUi build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State (gdb) break TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State the class TreeExplorer does not have any method named build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State Hint: try 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State or 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State (Note leading single quote.) (gdb) Is this a known bug, or is there some option I have to set? Any help with this would be greatly appreciated; it really sucks to have to type everything in. -- Maciej Kalisiak mac@dgp.toronto.edu www.dgp.toronto.edu/~mac >From dberlin@redhat.com Tue Nov 28 11:54:00 2000 From: Daniel Berlin To: gdb@sourceware.cygnus.com Subject: Re: problem with completion and C++ mangling Date: Tue, 28 Nov 2000 11:54:00 -0000 Message-id: References: <20001128141830.A2481@khazad-dum> X-SW-Source: 2000-11/msg00265.html Content-length: 2765 Maciej Kalisiak writes: > Hello all, > > I'm new to the list so please forgive me if this was already discussed, but > I'm extremely frustrated with this persistent problem: when doing function > completion for a "break" command in a C++ program, the C++ demangling is not > used, and thus the completion becomes useless. > > Let me give you an example ("" indicates where I press the Tab key): > [khazad-dum !28 L2 ~/src/dmg] % gdb dmg > GNU gdb 5.0 > Copyright 2000 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i686-pc-linux-gnu"... > (gdb) break Tree > TreeExplorer > TreeExplorer type_info function > TreeExplorer type_info node > TreeExplorer virtual table > TreeExplorer::TreeExplorer(DMGraph *, unsigned short, unsigned short) > TreeExplorer::add_node_to_ann(node) > TreeExplorer::ann_search(NilXState const &) > TreeExplorer::build_nodes_on_traj(node, CtrlInp const &, vector > const &) > TreeExplorer::develop_node(node) > TreeExplorer::execute(void) > TreeExplorer::make_ann_tree(void) > TreeExplorer::pick_node(void) > TreeExplorer::pick_traj_len(void) > TreeExplorer::reconnect(node, CtrlInp const &, vector > const &, node) > TreeExplorer::search_k(void) > TreeExplorer::spawn(node, CtrlInp const &, vector > const &) > TreeExplorer::update_ann_tree(void) > TreeExplorer::~TreeExplorer(void) > (gdb) break TreeExplorer::bui > build__11TrajBuilderRt6vector2Z5StateZt9allocator1Z5StateUi > build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State > (gdb) break TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State > the class TreeExplorer does not have any method named build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State > Hint: try 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State or 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State > (Note leading single quote.) > (gdb) > > Is this a known bug, or is there some option I have to set? Any help with this > would be greatly appreciated; it really sucks to have to type > everything in. It's a known bug, with a patch to fix it to go into CVS soon. Until then, just add a single quote before the C++ name, and completion will work fine. --Dan