{
/* Print it. */
uiout->text ("Value returned is ");
- uiout->field_fmt ("gdb-result-var", "$%d",
- rv->value_history_index);
+ uiout->field_fmt ("gdb-result-var", variable_name_style.style (),
+ "$%d", rv->value_history_index);
uiout->text (" = ");
if (finish_print)
}
}
+# Test the styling of "finish".
+proc test_finish_styling {} {
+ with_ansi_styling_terminal {
+ clean_restart $::testfile
+ }
+
+ gdb_test "break some_called_function" "Breakpoint $::decimal at .*"
+ if {![runto some_called_function]} {
+ return
+ }
+
+ gdb_test "finish" "Value returned is [style \\\$$::decimal variable] = 0"
+}
+
# Check to see if the Python styling of disassembler output is
# expected or not, this styling requires Python support in GDB, and
# the Python pygments module to be available.
test_pagination_cmd_after_quit_styling
test_pagination_prompt_styling
test_pagination_continue_styling
+test_finish_styling