This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[vms, committed] Add missing vmsdbgout_early_finish


Hi,

atm, any build for vms os will fail early in libgcc.

dwarf2_debug_hooks.early_finish needs to be called before dwarf2_debug_hooks.finish.

However, while vmsdbgout_finish calls dwarf2_debug_hooks.finish there's no vmsdbgout_early_finish, and dwarf2_debug_hooks.early_finish is not called otherwise.

This patch fixes that, by adding vmsdbgout_early_finish calling dwarf2_debug_hooks.early_finish.

I don't have a setup to build and test for vms os. I've built this for alpha-dec-vms as far as I can, which is until:
...
src/libgcc/config/alpha/vms-gcc_shell_handler.c:32:10: fatal error: vms/chfdef.h: No such file or directory
...

Approved at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82961#c8 .

Committed to trunk.

This is a 6/7 regression, but I'm somewhat reluctant to check this into release branches without proper build and test (though checking it in will probably unbreak the build).

Thanks,
- Tom
[vms] Add missing vmsdbgout_early_finish

2017-11-18  Tom de Vries  <tom@codesourcery.com>

	PR target/82961
	* vmsdbgout.c (vmsdbgout_early_finish): New function.
	(vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.

---
 gcc/vmsdbgout.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c
index 580dd28..91dcd2e 100644
--- a/gcc/vmsdbgout.c
+++ b/gcc/vmsdbgout.c
@@ -147,6 +147,7 @@ static int write_srccorrs (int);
 
 static void vmsdbgout_init (const char *);
 static void vmsdbgout_finish (const char *);
+static void vmsdbgout_early_finish (const char *);
 static void vmsdbgout_assembly_start (void);
 static void vmsdbgout_define (unsigned int, const char *);
 static void vmsdbgout_undef (unsigned int, const char *);
@@ -176,7 +177,7 @@ static void vmsdbgout_abstract_function (tree);
 const struct gcc_debug_hooks vmsdbg_debug_hooks
 = {vmsdbgout_init,
    vmsdbgout_finish,
-   debug_nothing_charstar,
+   vmsdbgout_early_finish,
    vmsdbgout_assembly_start,
    vmsdbgout_define,
    vmsdbgout_undef,
@@ -1556,6 +1557,13 @@ vmsdbgout_abstract_function (tree decl)
     (*dwarf2_debug_hooks.outlining_inline_function) (decl);
 }
 
+static void
+vmsdbgout_early_finish (const char *filename)
+{
+  if (write_symbols == VMS_AND_DWARF2_DEBUG)
+    (*dwarf2_debug_hooks.early_finish) (filename);
+}
+
 /* Output stuff that Debug requires at the end of every file and generate the
    VMS Debug debugging info.  */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]