|
From: <sv...@va...> - 2005-05-16 00:04:34
|
Author: njn
Date: 2005-05-16 01:04:02 +0100 (Mon, 16 May 2005)
New Revision: 3731
Modified:
trunk/coregrind/vg_dwarf.c
Log:
Move some decls in vg_dwarf.c closer to the comment explaining them.
Modified: trunk/coregrind/vg_dwarf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/vg_dwarf.c 2005-05-16 00:01:04 UTC (rev 3730)
+++ trunk/coregrind/vg_dwarf.c 2005-05-16 00:04:02 UTC (rev 3731)
@@ -863,58 +863,6 @@
8 is the return address (EIP) */
=20
=20
-/* ------------ Deal with summary-info records ------------ */
-
-void VG_(ppCfiSI) ( CfiSI* si )
-{
-# define SHOW_HOW(_how, _off) \
- do { \
- if (_how =3D=3D CFIR_UNKNOWN) { \
- VG_(printf)("Unknown"); \
- } else \
- if (_how =3D=3D CFIR_SAME) { \
- VG_(printf)("Same"); \
- } else \
- if (_how =3D=3D CFIR_CFAREL) { \
- VG_(printf)("cfa+%d", _off); \
- } else \
- if (_how =3D=3D CFIR_MEMCFAREL) { \
- VG_(printf)("*(cfa+%d)", _off); \
- } else { \
- VG_(printf)("???"); \
- } \
- } while (0)
-
- VG_(printf)("[%p .. %p]: ", si->base,=20
- si->base + (UWord)si->len - 1);
- VG_(printf)("let cfa=3D%s+%d",=20
- si->cfa_sprel ? "oldSP" : "oldFP", si->cfa_off);
- VG_(printf)(" in RA=3D");
- SHOW_HOW(si->ra_how, si->ra_off);
- VG_(printf)(" SP=3D");
- SHOW_HOW(si->sp_how, si->sp_off);
- VG_(printf)(" FP=3D");
- SHOW_HOW(si->fp_how, si->fp_off);
- VG_(printf)("\n");
-
-# undef SHOW_HOW
-}
-
-static void initCfiSI ( CfiSI* si )
-{
- si->base =3D 0;
- si->len =3D 0;
- si->cfa_sprel =3D False;
- si->ra_how =3D 0;
- si->sp_how =3D 0;
- si->fp_how =3D 0;
- si->cfa_off =3D 0;
- si->ra_off =3D 0;
- si->sp_off =3D 0;
- si->fp_off =3D 0;
-}
-
-
/* --------------- Decls --------------- */
=20
#if defined(VGP_x86_linux)
@@ -1065,6 +1013,58 @@
}
=20
=20
+/* ------------ Deal with summary-info records ------------ */
+
+void VG_(ppCfiSI) ( CfiSI* si )
+{
+# define SHOW_HOW(_how, _off) \
+ do { \
+ if (_how =3D=3D CFIR_UNKNOWN) { \
+ VG_(printf)("Unknown"); \
+ } else \
+ if (_how =3D=3D CFIR_SAME) { \
+ VG_(printf)("Same"); \
+ } else \
+ if (_how =3D=3D CFIR_CFAREL) { \
+ VG_(printf)("cfa+%d", _off); \
+ } else \
+ if (_how =3D=3D CFIR_MEMCFAREL) { \
+ VG_(printf)("*(cfa+%d)", _off); \
+ } else { \
+ VG_(printf)("???"); \
+ } \
+ } while (0)
+
+ VG_(printf)("[%p .. %p]: ", si->base,=20
+ si->base + (UWord)si->len - 1);
+ VG_(printf)("let cfa=3D%s+%d",=20
+ si->cfa_sprel ? "oldSP" : "oldFP", si->cfa_off);
+ VG_(printf)(" in RA=3D");
+ SHOW_HOW(si->ra_how, si->ra_off);
+ VG_(printf)(" SP=3D");
+ SHOW_HOW(si->sp_how, si->sp_off);
+ VG_(printf)(" FP=3D");
+ SHOW_HOW(si->fp_how, si->fp_off);
+ VG_(printf)("\n");
+
+# undef SHOW_HOW
+}
+
+static void initCfiSI ( CfiSI* si )
+{
+ si->base =3D 0;
+ si->len =3D 0;
+ si->cfa_sprel =3D False;
+ si->ra_how =3D 0;
+ si->sp_how =3D 0;
+ si->fp_how =3D 0;
+ si->cfa_off =3D 0;
+ si->ra_off =3D 0;
+ si->sp_off =3D 0;
+ si->fp_off =3D 0;
+}
+
+
/* --------------- Summarisation --------------- */
=20
/* Summarise ctx into si, if possible. Returns True if successful.
|