- if (level >= 0)
- printf_filtered ("#%-2d ", level);
- if (addressprint)
- if (fi->pc != sal.pc || !sal.symtab)
- {
- annotate_frame_address ();
- print_address_numeric (fi->pc, 1, gdb_stdout);
- annotate_frame_address_end ();
- printf_filtered (" in ");
- }
- annotate_frame_function_name ();
- fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
- DMGL_ANSI);
+#ifdef UI_OUT
+ ui_out_list_begin (uiout, "frame");
+#endif
+
+ if (level >= 0)
+ {
+#ifdef UI_OUT
+ ui_out_text (uiout, "#");
+ ui_out_field_fmt (uiout, "level", "%-2d", level);
+ ui_out_spaces (uiout, 1);
+#else
+ printf_filtered ("#%-2d ", level);
+#endif
+ }
+ if (addressprint)
+ if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)
+ {
+ annotate_frame_address ();
+#ifdef UI_OUT
+ ui_out_field_core_addr (uiout, "addr", fi->pc);
+ annotate_frame_address_end ();
+ ui_out_text (uiout, " in ");
+#else
+ print_address_numeric (fi->pc, 1, gdb_stdout);
+ annotate_frame_address_end ();
+ printf_filtered (" in ");
+#endif
+ }
+ annotate_frame_function_name ();
+#ifdef UI_OUT
+ fprintf_symbol_filtered (stb->stream, funname ? funname : "??", funlang,
+ DMGL_ANSI);
+ ui_out_field_stream (uiout, "func", stb);
+ ui_out_wrap_hint (uiout, " ");
+#else
+ fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
+ DMGL_ANSI);
+ wrap_here (" ");
+#endif
+ annotate_frame_args ();
+
+#ifdef UI_OUT
+ ui_out_text (uiout, " (");
+#else
+ fputs_filtered (" (", gdb_stdout);
+#endif
+ if (args)
+ {
+ struct print_args_args args;
+ args.fi = fi;
+ args.func = func;
+ args.stream = gdb_stdout;
+#ifdef UI_OUT
+ ui_out_list_begin (uiout, "args");
+ catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
+ /* FIXME: args must be a list. If one argument is a string it will
+ have " that will not be properly escaped. */
+ ui_out_list_end (uiout);
+#else
+ catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
+#endif
+ QUIT;
+ }
+#ifdef UI_OUT
+ ui_out_text (uiout, ")");
+#else
+ printf_filtered (")");
+#endif
+ if (sal.symtab && sal.symtab->filename)
+ {
+ annotate_frame_source_begin ();
+#ifdef UI_OUT
+ ui_out_wrap_hint (uiout, " ");
+ ui_out_text (uiout, " at ");
+ annotate_frame_source_file ();
+ ui_out_field_string (uiout, "file", sal.symtab->filename);
+ annotate_frame_source_file_end ();
+ ui_out_text (uiout, ":");
+ annotate_frame_source_line ();
+ ui_out_field_int (uiout, "line", sal.line);
+#else