From a5d0ce8935bdfa87037b3cbe72e74ab6a96e8109 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 25 Jul 2011 15:35:13 -0700 Subject: [PATCH] dwarf2cfi: Add debug_cfi_row. From-SVN: r176771 --- gcc/ChangeLog | 4 ++++ gcc/dwarf2cfi.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 421fcee2efa..e33d773d00d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-07-25 Richard Henderson + + * dwarf2cfi.c (dump_cfi_row, debug_cfi_row): New. + 2011-07-25 Joern Rennecke * genattr.c (write_upcase, gen_attr ): diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 57fe566baf9..1b542780504 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -3314,6 +3314,38 @@ dwarf2out_emit_cfi (dw_cfi_ref cfi) if (dwarf2out_do_cfi_asm ()) output_cfi_directive (asm_out_file, cfi); } + +static void +dump_cfi_row (FILE *f, dw_cfi_row *row) +{ + dw_cfi_ref cfi; + unsigned i; + + cfi = row->cfa_cfi; + if (!cfi) + { + dw_cfa_location dummy; + memset(&dummy, 0, sizeof(dummy)); + dummy.reg = INVALID_REGNUM; + cfi = def_cfa_0 (&dummy, &row->cfa); + } + output_cfi_directive (f, cfi); + + FOR_EACH_VEC_ELT (dw_cfi_ref, row->reg_save, i, cfi) + if (cfi) + output_cfi_directive (f, cfi); + + fprintf (f, "\t.cfi_GNU_args_size "HOST_WIDE_INT_PRINT_DEC "\n", + row->args_size); +} + +void debug_cfi_row (dw_cfi_row *row); + +void +debug_cfi_row (dw_cfi_row *row) +{ + dump_cfi_row (stderr, row); +} /* Save the result of dwarf2out_do_frame across PCH. -- 2.30.2