Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Maciej Kalisiak <mac@cs.toronto.edu>
To: gdb@sourceware.cygnus.com
Subject: problem with completion and C++ mangling
Date: Tue, 28 Nov 2000 11:18:00 -0000	[thread overview]
Message-ID: <20001128141830.A2481@khazad-dum> (raw)

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 ("<TAB>" 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<TAB>
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<State, allocator<State> > 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<State, allocator<State> > const &, node)
TreeExplorer::search_k(void)
TreeExplorer::spawn(node, CtrlInp const &, vector<State, allocator<State> > const &)
TreeExplorer::update_ann_tree(void)
TreeExplorer::~TreeExplorer(void)
(gdb) break TreeExplorer::bui<TAB>
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<TAB> or 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State<ESC-?>
(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 <dberlin@redhat.com>
To: gdb@sourceware.cygnus.com
Subject: Re: problem with completion and C++ mangling
Date: Tue, 28 Nov 2000 11:54:00 -0000
Message-id: <m3hf4r6ffa.fsf@dan2.cygnus.com>
References: <20001128141830.A2481@khazad-dum>
X-SW-Source: 2000-11/msg00265.html
Content-length: 2765

Maciej Kalisiak <mac@cs.toronto.edu> 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 ("<TAB>" 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<TAB>
> 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<State, allocator<State> > 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<State, allocator<State> > const &, node)
> TreeExplorer::search_k(void)
> TreeExplorer::spawn(node, CtrlInp const &, vector<State, allocator<State> > const &)
> TreeExplorer::update_ann_tree(void)
> TreeExplorer::~TreeExplorer(void)
> (gdb) break TreeExplorer::bui<TAB>
> 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<TAB> or 'TreeExplorer::build_nodes_on_traj__12TreeExplorerG4nodeRC7CtrlInpRCt6vector2Z5StateZt9allocator1Z5State<ESC-?>
> (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


             reply	other threads:[~2000-11-28 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-28 11:18 Maciej Kalisiak [this message]
     [not found] ` <m3hf4r6ffa.fsf@dan2.cygnus.com>
2000-11-28 12:19   ` Maciej Kalisiak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001128141830.A2481@khazad-dum \
    --to=mac@cs.toronto.edu \
    --cc=gdb@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox