aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2015-01-11 14:06:34 -0800
committerDoug Evans <xdje42@gmail.com>2015-01-11 14:06:34 -0800
commit439250fbacfc212a5959b4b5a53ecfee91dfb866 (patch)
treed8ca359220a4a15371412276967646212eb490f9 /gdb/testsuite/gdb.cp
parentebf3aa72243fec4bc02617673b243a63050e6127 (diff)
downloadgdb-439250fbacfc212a5959b4b5a53ecfee91dfb866.zip
gdb-439250fbacfc212a5959b4b5a53ecfee91dfb866.tar.gz
gdb-439250fbacfc212a5959b4b5a53ecfee91dfb866.tar.bz2
PR gdb/15830
gdb/ChangeLog: PR gdb/15830 * NEWS: The "maint demangle" command is renamed as "demangle". * demangle.c: #include cli/cli-utils.h, language.h. (demangle_command): New function. (_initialize_demangle): Add new command "demangle". * maint.c (maintenance_demangle): Stub out. (_initialize_maint_cmds): Update help text for "maint demangle", and mark as deprecated. gdb/doc/ChangeLog: * gdb.texinfo (Debugging C Plus Plus): Mention "demangle". (Symbols): Ditto. (Maintenance Commands): Delete docs for "maint demangle". gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Remove references to "maint demangle". * gdb.cp/demangle.exp: Update. "maint demangle" -> "demangle". Add tests for explicitly specifying language to demangle. * gdb.dlang/demangle.exp: Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r--gdb/testsuite/gdb.cp/demangle.exp12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.cp/demangle.exp b/gdb/testsuite/gdb.cp/demangle.exp
index 0ac855b..078f4b4 100644
--- a/gdb/testsuite/gdb.cp/demangle.exp
+++ b/gdb/testsuite/gdb.cp/demangle.exp
@@ -73,7 +73,7 @@ proc test_demangling_core {tester test result} {
set_demangling_style $style
}
- $tester "maintenance demangle $name" $result $test
+ $tester "demangle $name" $result $test
}
### Demangle an identifier, and check that the result matches a pattern.
@@ -527,7 +527,7 @@ proc test_gnu_style_demangling {} {
## 1999-04-19: "Fix from Dale Hawkins". Shouldn't segfault.
# Accept even a dubious demangling; the string is ambiguous.
- gdb_test_multiple "maintenance demangle __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" {
+ gdb_test_multiple "demangle __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator" {
-re "virtual function thunk \\(delta:-64\\) for CosNaming::_proxy_NamingContext::_0RL__list\\(unsigned long, _CORBA_Unbounded_Sequence<CosNaming::Binding> \\*\\&, CosNaming::BindingIterator \\*\\&\\)\r\n$gdb_prompt $" {
pass "gnu: __thunk_64__0RL__list__Q29CosNaming20_proxy_NamingContextUlRPt25_CORBA_Unbounded_Sequence1ZQ29CosNaming7BindingRPQ29CosNaming15BindingIterator"
}
@@ -1557,6 +1557,14 @@ proc do_tests {} {
catch_demangling_errors test_gnu_style_demangling
catch_demangling_errors test_arm_style_demangling
catch_demangling_errors test_hp_style_demangling
+
+ # Verify specifying demangle language.
+ gdb_test_no_output "set language unknown"
+ set_demangling_style "auto"
+ gdb_test_exact "demangle -l c++ -- _ZSt4cout" "std::cout"
+ gdb_test_exact "demangle -l c++ _ZSt4cout" "std::cout"
+ gdb_test_exact "demangle -l c -- _ZSt4cout" "Can't demangle \"_ZSt4cout\""
+ gdb_test_exact "demangle -l garbage xyzdje" "Unknown language \"garbage\""
}
do_tests