#SCOPE #PREFIX #PRINT-SCOPE-QUOTED
#PRINT-SCOPE-UNQUOTED (opt)
set cxx_scopes_list {
- {"S::method()" "S_M" {= \\{void \\(S \\* const\\)\\} $hex <S::method\\(\\)>}
+ {"S::method()" "S_M" {= \{void \(S \* const\)\} $hex <S::method\(\)>}
{[cannot_resolve "S::method"]}}
- {"S::method() const" "S_M_C" {= \\{void \\(const S \\* const\\)\\} $hex <S::method\\(\\) const>}
+ {"S::method() const" "S_M_C" {= \{void \(const S \* const\)\} $hex <S::method\(\) const>}
$syntax_re}
- {"S::method() volatile" "S_M_V" {= \\{void \\(volatile S \\* const\\)\\} $hex <S::method\\(\\) volatile>}
+ {"S::method() volatile" "S_M_V" {= \{void \(volatile S \* const\)\} $hex <S::method\(\) volatile>}
$syntax_re}
- {"S::method() const volatile" "S_M_CV" {= \\{void \\(const volatile S \\* const\\)\\} $hex <S::method\\(\\) const volatile>}
+ {"S::method() const volatile" "S_M_CV" {= \{void \(const volatile S \* const\)\} $hex <S::method\(\) const volatile>}
$syntax_re}
- {"S::method() volatile const" "S_M_CV" {= \\{void \\(const volatile S \\* const\\)\\} $hex <S::method\\(\\) const volatile>}
+ {"S::method() volatile const" "S_M_CV" {= \{void \(const volatile S \* const\)\} $hex <S::method\(\) const volatile>}
$syntax_re}
- {"S::method(void)" "S_M" {= \\{void \\(S \\* const\\)\\} $hex <S::method\\(\\)>}}
- {"S::method(void) const" "S_M_C" {= \\{void \\(const S \\* const\\)\\} $hex <S::method\\(\\) const>}}
- {"S::method(void) volatile" "S_M_V" {= \\{void \\(volatile S \\* const\\)\\} $hex <S::method\\(\\) volatile>}}
- {"S::method(void) const volatile" "S_M_CV" {= \\{void \\(const volatile S \\* const\\)\\} $hex <S::method\\(\\) const volatile>}}
- {"S::method(void) volatile const" "S_M_CV" {= \\{void \\(const volatile S \\* const\\)\\} $hex <S::method\\(\\) const volatile>}}
+ {"S::method(void)" "S_M" {= \{void \(S \* const\)\} $hex <S::method\(\)>}}
+ {"S::method(void) const" "S_M_C" {= \{void \(const S \* const\)\} $hex <S::method\(\) const>}}
+ {"S::method(void) volatile" "S_M_V" {= \{void \(volatile S \* const\)\} $hex <S::method\(\) volatile>}}
+ {"S::method(void) const volatile" "S_M_CV" {= \{void \(const volatile S \* const\)\} $hex <S::method\(\) const volatile>}}
+ {"S::method(void) volatile const" "S_M_CV" {= \{void \(const volatile S \* const\)\} $hex <S::method\(\) const volatile>}}
- {"S::static_method()" "S_SM" {= \\{void \\(void\\)\\} $hex <S::static_method\\(\\)>}
+ {"S::static_method()" "S_SM" {= \{void \(void\)\} $hex <S::static_method\(\)>}
"void"}
- {"S::static_method(void)" "S_SM" {= \\{void \\(void\\)\\} $hex <S::static_method\\(\\)>}}
+ {"S::static_method(void)" "S_SM" {= \{void \(void\)\} $hex <S::static_method\(\)>}}
- {"S::inline_method()" "S_IM" {= \\{void \\(S \\* const\\)\\} $hex <S::inline_method\\(\\)>}
+ {"S::inline_method()" "S_IM" {= \{void \(S \* const\)\} $hex <S::inline_method\(\)>}
{[cannot_resolve "S::inline_method"]}}
- {"S::inline_method(void)" "S_IM" {= \\{void \\(S \\* const\\)\\} $hex <S::inline_method\\(\\)>}}
+ {"S::inline_method(void)" "S_IM" {= \{void \(S \* const\)\} $hex <S::inline_method\(\)>}}
- {"S::static_inline_method()" "S_SIM" {= \\{void \\(void\\)\\} $hex <S::static_inline_method\\(\\)>}
+ {"S::static_inline_method()" "S_SIM" {= \{void \(void\)\} $hex <S::static_inline_method\(\)>}
"void"}
- {"S::static_inline_method(void)" "S_SIM" {= \\{void \\(void\\)\\} $hex <S::static_inline_method\\(\\)>}}
+ {"S::static_inline_method(void)" "S_SIM" {= \{void \(void\)\} $hex <S::static_inline_method\(\)>}}
- {"S2<int>::method()" "S2_M" {= \\{void \\(S2<int> \\* const\\)\\} $hex <S2<int>::method\\(\\)>}
+ {"S2<int>::method()" "S2_M" {= \{void \(S2<int> \* const\)\} $hex <S2<int>::method\(\)>}
{[cannot_resolve "S2<int>::method"]}}
- {"S2<int>::static_method()" "S2_SM" {= \\{void \\(void\\)\\} $hex <S2<int>::static_method\\(\\)>}
+ {"S2<int>::static_method()" "S2_SM" {= \{void \(void\)\} $hex <S2<int>::static_method\(\)>}
"void"}
- {"S2<int>::inline_method()" "S2_IM" {= \\{void \\(S2<int> \\* const\\)\\} $hex <S2<int>::inline_method\\(\\)>}
+ {"S2<int>::inline_method()" "S2_IM" {= \{void \(S2<int> \* const\)\} $hex <S2<int>::inline_method\(\)>}
{[cannot_resolve "S2<int>::inline_method"]}}
- {"S2<int>::static_inline_method()" "S2_SIM" {= \\{void \\(void\\)\\} $hex <S2<int>::static_inline_method\\(\\)>}
+ {"S2<int>::static_inline_method()" "S2_SIM" {= \{void \(void\)\} $hex <S2<int>::static_inline_method\(\)>}
"void"}
- {"free_func" "FF" {= \\{void \\(void\\)\\} $hex <free_func\\(\\)>}}
+ {"free_func" "FF" {= \{void \(void\)\} $hex <free_func\(\)>}}
- {"free_func()" "FF" {= \\{void \\(void\\)\\} $hex <free_func\\(\\)>}
+ {"free_func()" "FF" {= \{void \(void\)\} $hex <free_func\(\)>}
"void"}
- {"free_func(void)" "FF" {= \\{void \\(void\\)\\} $hex <free_func\\(\\)>}}
+ {"free_func(void)" "FF" {= \{void \(void\)\} $hex <free_func\(\)>}}
- {"free_inline_func()" "FIF" {= \\{void \\(void\\)\\} $hex <free_inline_func\\(\\)>}
+ {"free_inline_func()" "FIF" {= \{void \(void\)\} $hex <free_inline_func\(\)>}
"void"}
- {"free_inline_func(void)" "FIF" {= \\{void \\(void\\)\\} $hex <free_inline_func\\(\\)>}}
+ {"free_inline_func(void)" "FIF" {= \{void \(void\)\} $hex <free_inline_func\(\)>}}
}
set c_scopes_list {
- {"free_func" "FF" {= \\{void \\(void\\)\\} $hex <free_func>}}
- {"free_inline_func" "FIF" {= \\{void \\(void\\)\\} $hex <free_inline_func>}}
+ {"free_func" "FF" {= \{void \(void\)\} $hex <free_func>}}
+ {"free_inline_func" "FIF" {= \{void \(void\)\} $hex <free_inline_func>}}
}
# A list of all the static varibles defined in each scope. The first
global vars_list
global srcfile testfile
global gdb_prompt
+ global hex
+ global syntax_re
set options {debug}
return
}
- gdb_test "show language" " currently [string_to_regexp $lang]\"\\."
+ gdb_test "show language" [string_to_regexp [subst_vars {currently $lang".}]]
if {$lang == "c"} {
set scopes_list $c_scopes_list
set scope [lindex $scope_line 0]
set print_quoted_re [lindex $scope_line 2]
- set print_quoted_re [uplevel 1 "subst_vars \"$print_quoted_re\""]
+ set print_quoted_re [subst_vars $print_quoted_re]
set print_unquoted_re [lindex $scope_line 3]
- set print_unquoted_re [uplevel 1 "subst_vars \"$print_unquoted_re\""]
+ set print_unquoted_re [subst_vars $print_unquoted_re]
gdb_test "print '${scope}'" $print_quoted_re
}
}
} else {
- gdb_test "print '${sym}'" "No symbol \"$sym\" in current context\\."
+ gdb_test "print '${sym}'" \
+ [string_to_regexp [subst_vars {No symbol "$sym" in current context.}]]
}
}
}