return -1
}
+ set readnow [readnow]
+
if {![runto_main]} {
fail "style tests failed"
return
}
+ # Check that the source highlighter has not stripped away the leading
+ # newlines.
+ set main_line [gdb_get_line_number "break here"]
+ gdb_test "list $main_line,$main_line" "return.*some_called_function.*"
+
gdb_test_no_output "set style enabled on"
set main_expr [style main function]
}
if {$test_macros} {
+ set macro_line [gdb_get_line_number "\#define SOME_MACRO"]
gdb_test "info macro SOME_MACRO" \
- "Defined at $base_file_expr:16\r\n#define SOME_MACRO 23"
+ "Defined at $base_file_expr:$macro_line\r\n#define SOME_MACRO 23"
}
set func [style some_called_function function]
# Somewhere should see the call to the function.
gdb_test "disassemble main" "[style $hex address].*$func.*"
+ set ifield [style int_field variable]
+ set sfield [style string_field variable]
+ set efield [style e_field variable]
+ set evalue [style VALUE_TWO variable]
+ gdb_test "print struct_value" \
+ "\{$ifield = 23,.*$sfield = .*,.*$efield = $evalue.*"
+
gdb_exit
gdb_spawn
[multi_line \
"List of classes of commands:" \
"" \
- "${aliases_expr} -- Aliases of other commands\." \
+ "${aliases_expr} -- User-defined aliases of other commands\." \
"${breakpoints_expr} -- Making program stop at certain points\." \
".*" \
] \
gdb_test "apropos -v cut for 'thre" \
[multi_line \
"" \
- "${taas_expr} --.*" \
+ "${taas_expr}" \
+ "Apply a command to all .*" \
"Usage:.*" \
"short${cut_for_thre_expr}ad apply.*" \
"" \
- "${tfaas_expr} --.*" \
+ "${tfaas_expr}" \
+ "Apply a command to all .*" \
"Usage:.*" \
"short${cut_for_thre_expr}ad apply.*" \
]
set quoted [string_to_regexp $binfile]
+ set pass_re "Reading symbols from [style $quoted file]\.\.\."
+ if { $readnow } {
+ set pass_re \
+ [multi_line \
+ $pass_re \
+ "Expanding full symbols from [style $quoted file]\.\.\."]
+ }
gdb_test "file $binfile" \
- "Reading symbols from [style $quoted file]..." \
+ $pass_re \
"filename is styled when loading symbol file"
gdb_test "pwd" "Working directory [style .*? file].*"