From patchwork Fri Feb 17 18:59:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 729273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vQ2Q50QPSz9s7x for ; Sat, 18 Feb 2017 05:59:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NvCTXn9K"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=OHWMw6vwDD6Zqgj6uAKb+Jlb4Mwbp T3FQL9gy5oENUuGFbNH4FYBP1hQBPOYRbooK9jgoWHbN8AGFoeOmGXFp7vuCsPMa 4yc7ww29wPOUi3Gfc/ivnxN5/8UFd5GjaJzGcI9VyBsupgkcASPPP6JipYYJ2Cjt eet+mnz2vBb7dM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=kWC6cpQUjaP2/cWrijlTPB6qvso=; b=NvC TXn9KLGlDJGF3qOMgKtKIoQyMVNEsMwMH7dyjJlk5mMPmFlnNz3FZM2GHmvEbbP3 aJ63ITXE2g1+XcfkuSSHUfGATvExPovERN7uxlDaJ1m9CdtQzFAU9e16aMKzaLVs pnum//WAa3VrJPyQLQtoFIF/KbFnQixHpN5FYI3c= Received: (qmail 760 invoked by alias); 17 Feb 2017 18:59:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 130781 invoked by uid 89); 17 Feb 2017 18:59:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=1339, LINE, 3278, (unknown) X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Feb 2017 18:59:28 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80BF63D961 for ; Fri, 17 Feb 2017 18:59:28 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-76.ams2.redhat.com [10.36.117.76]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1HIxQ6s024147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 17 Feb 2017 13:59:27 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v1HIxOlA013038; Fri, 17 Feb 2017 19:59:24 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v1HIxNvm013037; Fri, 17 Feb 2017 19:59:23 +0100 Date: Fri, 17 Feb 2017 19:59:23 +0100 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, Pedro Alves , Jan Kratochvil Subject: [PATCH] Emit column info even in .debug_line section Message-ID: <20170217185923.GS1849@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes Hi! And here is incremental patch to provide column information even in .debug_line (whether through .loc directives or custom .debug_line). The patch looks large, because I had to adjust the two hooks to pass through the column information, but beyond that it is actually very simple. If the earlier patch is ok, would this be ok too (not bootstrapped yet, going to regtest it soon)? 2017-02-17 Jakub Jelinek * final.c (last_columnnum, override_columnnum): New variables. (final_start_function): Set last_columnnum, pass it to begin_prologue hook and pass 0 to dwarf2out_begin_prologue. (final_scan_insn): Update override_columnnum. Pass last_columnnum to source_line debug hook. (notice_source_line): Compute last_columnnum and for debug_column_info return true on column changes. * debug.h (struct gcc_debug_hooks): Add column argument to source_line and begin_prologue hooks. (debug_nothing_int_charstar_int_bool): Remove prototype. (debug_nothing_int_int_charstar, debug_nothing_int_int_charstar_int_bool): New prototypes. (dwarf2out_begin_prologue): Add column argument. * debug.c (do_nothing_debug_hooks): Adjust source_line and begin_prologue hooks. (debug_nothing_int_charstar_int_bool): Remove. (debug_nothing_int_int_charstar, debug_nothing_int_int_charstar_int_bool): New functions. * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it through to dwarf2out_source_line. (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook. (dwarf2out_source_line): Add column argument, emit it if requested. * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column arguments. * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise. * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise. * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it through to dwarf2out_begin_prologue. (vmsdbgout_source_line): Add column argument, pass it through to dwarf2out_source_line. * dbxout.c (dbxout_begin_prologue): Add column argument, adjust dbxout_source_line caller. (dbxout_source_line): Add column argument. Jakub --- gcc/final.c.jj 2017-01-24 23:29:07.000000000 +0100 +++ gcc/final.c 2017-02-17 19:13:39.504406149 +0100 @@ -118,6 +118,9 @@ rtx_insn *current_output_insn; /* Line number of last NOTE. */ static int last_linenum; +/* Column number of last NOTE. */ +static int last_columnnum; + /* Last discriminator written to assembly. */ static int last_discriminator; @@ -133,9 +136,10 @@ static int high_function_linenum; /* Filename of last NOTE. */ static const char *last_filename; -/* Override filename and line number. */ +/* Override filename, line and column number. */ static const char *override_filename; static int override_linenum; +static int override_columnnum; /* Whether to force emission of a line note before the next insn. */ static bool force_source_line = false; @@ -1763,6 +1767,7 @@ final_start_function (rtx_insn *first, F last_filename = LOCATION_FILE (prologue_location); last_linenum = LOCATION_LINE (prologue_location); + last_columnnum = LOCATION_COLUMN (prologue_location); last_discriminator = discriminator = 0; high_block_linenum = high_function_linenum = last_linenum; @@ -1771,10 +1776,10 @@ final_start_function (rtx_insn *first, F asan_function_start (); if (!DECL_IGNORED_P (current_function_decl)) - debug_hooks->begin_prologue (last_linenum, last_filename); + debug_hooks->begin_prologue (last_linenum, last_columnnum, last_filename); if (!dwarf2_debug_info_emitted_p (current_function_decl)) - dwarf2out_begin_prologue (0, NULL); + dwarf2out_begin_prologue (0, 0, NULL); #ifdef LEAF_REG_REMAP if (crtl->uses_only_leaf_regs) @@ -2335,6 +2340,7 @@ final_scan_insn (rtx_insn *insn, FILE *f { override_filename = LOCATION_FILE (*locus_ptr); override_linenum = LOCATION_LINE (*locus_ptr); + override_columnnum = LOCATION_COLUMN (*locus_ptr); } } break; @@ -2370,11 +2376,13 @@ final_scan_insn (rtx_insn *insn, FILE *f { override_filename = LOCATION_FILE (*locus_ptr); override_linenum = LOCATION_LINE (*locus_ptr); + override_columnnum = LOCATION_COLUMN (*locus_ptr); } else { override_filename = NULL; override_linenum = 0; + override_columnnum = 0; } } break; @@ -2592,8 +2600,9 @@ final_scan_insn (rtx_insn *insn, FILE *f { if (flag_verbose_asm) asm_show_source (last_filename, last_linenum); - (*debug_hooks->source_line) (last_linenum, last_filename, - last_discriminator, is_stmt); + (*debug_hooks->source_line) (last_linenum, last_columnnum, + last_filename, last_discriminator, + is_stmt); } if (GET_CODE (body) == PARALLEL @@ -3078,23 +3087,26 @@ static bool notice_source_line (rtx_insn *insn, bool *is_stmt) { const char *filename; - int linenum; + int linenum, columnnum; if (override_filename) { filename = override_filename; linenum = override_linenum; + columnnum = override_columnnum; } else if (INSN_HAS_LOCATION (insn)) { expanded_location xloc = insn_location (insn); filename = xloc.file; linenum = xloc.line; + columnnum = xloc.column; } else { filename = NULL; linenum = 0; + columnnum = 0; } if (filename == NULL) @@ -3102,11 +3114,13 @@ notice_source_line (rtx_insn *insn, bool if (force_source_line || filename != last_filename - || last_linenum != linenum) + || last_linenum != linenum + || (debug_column_info && last_columnnum != columnnum)) { force_source_line = false; last_filename = filename; last_linenum = linenum; + last_columnnum = columnnum; last_discriminator = discriminator; *is_stmt = true; high_block_linenum = MAX (last_linenum, high_block_linenum); --- gcc/debug.h.jj 2017-01-01 12:45:37.000000000 +0100 +++ gcc/debug.h 2017-02-17 19:10:55.919495624 +0100 @@ -65,13 +65,14 @@ struct gcc_debug_hooks though the BLOCK information is messed up. Defaults to true. */ bool (* ignore_block) (const_tree); - /* Record a source file location at (FILE, LINE, DISCRIMINATOR). */ - void (* source_line) (unsigned int line, const char *file, - int discriminator, bool is_stmt); + /* Record a source file location at (FILE, LINE, COLUMN, DISCRIMINATOR). */ + void (* source_line) (unsigned int line, unsigned int column, + const char *file, int discriminator, bool is_stmt); /* Called at start of prologue code. LINE is the first line in the function. */ - void (* begin_prologue) (unsigned int line, const char *file); + void (* begin_prologue) (unsigned int line, unsigned int column, + const char *file); /* Called at end of prologue code. LINE is the first line in the function. */ @@ -193,9 +194,13 @@ extern const struct gcc_debug_hooks *deb /* The do-nothing hooks. */ extern void debug_nothing_void (void); extern void debug_nothing_charstar (const char *); +extern void debug_nothing_int_int_charstar (unsigned int, unsigned int, + const char *); extern void debug_nothing_int_charstar (unsigned int, const char *); -extern void debug_nothing_int_charstar_int_bool (unsigned int, const char *, - int, bool); +extern void debug_nothing_int_int_charstar_int_bool (unsigned int, + unsigned int, + const char *, + int, bool); extern void debug_nothing_int (unsigned int); extern void debug_nothing_int_int (unsigned int, unsigned int); extern void debug_nothing_tree (tree); @@ -217,7 +222,8 @@ extern const struct gcc_debug_hooks vmsd /* Dwarf2 frame information. */ -extern void dwarf2out_begin_prologue (unsigned int, const char *); +extern void dwarf2out_begin_prologue (unsigned int, unsigned int, + const char *); extern void dwarf2out_vms_end_prologue (unsigned int, const char *); extern void dwarf2out_vms_begin_epilogue (unsigned int, const char *); extern void dwarf2out_end_epilogue (unsigned int, const char *); --- gcc/debug.c.jj 2017-01-01 12:45:35.000000000 +0100 +++ gcc/debug.c 2017-02-17 19:14:10.010016500 +0100 @@ -35,8 +35,8 @@ const struct gcc_debug_hooks do_nothing_ debug_nothing_int_int, /* begin_block */ debug_nothing_int_int, /* end_block */ debug_true_const_tree, /* ignore_block */ - debug_nothing_int_charstar_int_bool, /* source_line */ - debug_nothing_int_charstar, /* begin_prologue */ + debug_nothing_int_int_charstar_int_bool, /* source_line */ + debug_nothing_int_int_charstar, /* begin_prologue */ debug_nothing_int_charstar, /* end_prologue */ debug_nothing_int_charstar, /* begin_epilogue */ debug_nothing_int_charstar, /* end_epilogue */ @@ -115,10 +115,18 @@ debug_nothing_int_charstar (unsigned int } void -debug_nothing_int_charstar_int_bool (unsigned int line ATTRIBUTE_UNUSED, - const char *text ATTRIBUTE_UNUSED, - int discriminator ATTRIBUTE_UNUSED, - bool is_stmt ATTRIBUTE_UNUSED) +debug_nothing_int_int_charstar (unsigned int line ATTRIBUTE_UNUSED, + unsigned int column ATTRIBUTE_UNUSED, + const char *text ATTRIBUTE_UNUSED) +{ +} + +void +debug_nothing_int_int_charstar_int_bool (unsigned int line ATTRIBUTE_UNUSED, + unsigned int column ATTRIBUTE_UNUSED, + const char *text ATTRIBUTE_UNUSED, + int discriminator ATTRIBUTE_UNUSED, + bool is_stmt ATTRIBUTE_UNUSED) { } --- gcc/dwarf2out.c.jj 2017-02-17 18:29:53.000000000 +0100 +++ gcc/dwarf2out.c 2017-02-17 19:10:26.481871631 +0100 @@ -93,7 +93,8 @@ along with GCC; see the file COPYING3. #include "gdb/gdb-index.h" #include "rtl-iter.h" -static void dwarf2out_source_line (unsigned int, const char *, int, bool); +static void dwarf2out_source_line (unsigned int, unsigned int, const char *, + int, bool); static rtx_insn *last_var_location_insn; static rtx_insn *cached_next_real_insn; static void dwarf2out_decl (tree); @@ -1023,6 +1024,7 @@ dwarf2out_alloc_current_fde (void) void dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED, + unsigned int column ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) { char label[MAX_ARTIFICIAL_LABEL_BYTES]; @@ -1073,7 +1075,7 @@ dwarf2out_begin_prologue (unsigned int l prologue case, not the eh frame case. */ #ifdef DWARF2_DEBUGGING_INFO if (file) - dwarf2out_source_line (line, file, 0, true); + dwarf2out_source_line (line, column, file, 0, true); #endif if (dwarf2out_do_cfi_asm ()) @@ -1099,7 +1101,7 @@ dwarf2out_begin_prologue (unsigned int l void dwarf2out_vms_end_prologue (unsigned int line ATTRIBUTE_UNUSED, - const char *file ATTRIBUTE_UNUSED) + const char *file ATTRIBUTE_UNUSED) { char label[MAX_ARTIFICIAL_LABEL_BYTES]; @@ -2733,7 +2735,7 @@ const struct gcc_debug_hooks dwarf2_line debug_nothing_int_int, /* end_block */ debug_true_const_tree, /* ignore_block */ dwarf2out_source_line, /* source_line */ - debug_nothing_int_charstar, /* begin_prologue */ + debug_nothing_int_int_charstar, /* begin_prologue */ debug_nothing_int_charstar, /* end_prologue */ debug_nothing_int_charstar, /* begin_epilogue */ debug_nothing_int_charstar, /* end_epilogue */ @@ -26534,7 +26536,8 @@ push_dw_line_info_entry (dw_line_info_ta /* ??? The discriminator parameter ought to be unsigned. */ static void -dwarf2out_source_line (unsigned int line, const char *filename, +dwarf2out_source_line (unsigned int line, unsigned int column, + const char *filename, int discriminator, bool is_stmt) { unsigned int file_num; @@ -26548,6 +26551,9 @@ dwarf2out_source_line (unsigned int line if (dwarf_version < 4 && dwarf_strict) discriminator = 0; + if (!debug_column_info) + column = 0; + table = cur_line_info_table; file_num = maybe_emit_file (lookup_filename (filename)); @@ -26567,6 +26573,7 @@ dwarf2out_source_line (unsigned int line if (0 && file_num == table->file_num && line == table->line_num + && column == table->column_num && discriminator == table->discrim_num && is_stmt == table->is_stmt) return; @@ -26575,7 +26582,14 @@ dwarf2out_source_line (unsigned int line /* If requested, emit something human-readable. */ if (flag_debug_asm) - fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START, filename, line); + { + if (debug_column_info) + fprintf (asm_out_file, "\t%s %s:%d:%d\n", ASM_COMMENT_START, + filename, line, column); + else + fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START, + filename, line); + } if (DWARF2_ASM_LINE_DEBUG_INFO) { @@ -26587,7 +26601,10 @@ dwarf2out_source_line (unsigned int line putc (' ', asm_out_file); fprint_ul (asm_out_file, line); putc (' ', asm_out_file); - putc ('0', asm_out_file); + if (debug_column_info) + fprint_ul (asm_out_file, column); + else + putc ('0', asm_out_file); if (is_stmt != table->is_stmt) { @@ -26616,10 +26633,13 @@ dwarf2out_source_line (unsigned int line if (is_stmt != table->is_stmt) push_dw_line_info_entry (table, LI_negate_stmt, 0); push_dw_line_info_entry (table, LI_set_line, line); + if (debug_column_info) + push_dw_line_info_entry (table, LI_set_column, column); } table->file_num = file_num; table->line_num = line; + table->column_num = column; table->discrim_num = discriminator; table->is_stmt = is_stmt; table->in_use = true; --- gcc/sdbout.c.jj 2017-01-01 12:45:35.000000000 +0100 +++ gcc/sdbout.c 2017-02-17 19:12:27.526325527 +0100 @@ -116,11 +116,13 @@ static void sdbout_start_source_file (un static void sdbout_end_source_file (unsigned int); static void sdbout_begin_block (unsigned int, unsigned int); static void sdbout_end_block (unsigned int, unsigned int); -static void sdbout_source_line (unsigned int, const char *, int, bool); +static void sdbout_source_line (unsigned int, unsigned int, + const char *, int, bool); static void sdbout_end_epilogue (unsigned int, const char *); static void sdbout_early_global_decl (tree); static void sdbout_late_global_decl (tree); -static void sdbout_begin_prologue (unsigned int, const char *); +static void sdbout_begin_prologue (unsigned int, unsigned int, + const char *); static void sdbout_end_prologue (unsigned int, const char *); static void sdbout_begin_function (tree); static void sdbout_end_function (unsigned int); @@ -1519,7 +1521,8 @@ sdbout_end_block (unsigned int line, uns number LINE. */ static void -sdbout_source_line (unsigned int line, const char *filename ATTRIBUTE_UNUSED, +sdbout_source_line (unsigned int line, unsigned int column ATTRIBUTE_UNUSED, + const char *filename ATTRIBUTE_UNUSED, int discriminator ATTRIBUTE_UNUSED, bool is_stmt ATTRIBUTE_UNUSED) { @@ -1551,7 +1554,8 @@ sdbout_begin_function (tree decl ATTRIBU describe the parameter list. */ static void -sdbout_begin_prologue (unsigned int line, const char *file ATTRIBUTE_UNUSED) +sdbout_begin_prologue (unsigned int line, unsigned int column ATTRIBUTE_UNUSED, + const char *file ATTRIBUTE_UNUSED) { sdbout_end_prologue (line, file); } --- gcc/xcoffout.h.jj 2017-01-01 12:45:34.000000000 +0100 +++ gcc/xcoffout.h 2017-02-17 18:31:11.961331304 +0100 @@ -181,13 +181,14 @@ do { \ /* Prototype functions in xcoffout.c. */ extern int stab_to_sclass (int); -extern void xcoffout_begin_prologue (unsigned int, const char *); +extern void xcoffout_begin_prologue (unsigned int, unsigned int, const char *); extern void xcoffout_begin_block (unsigned, unsigned); extern void xcoffout_end_epilogue (unsigned int, const char *); extern void xcoffout_end_function (unsigned int); extern void xcoffout_end_block (unsigned, unsigned); extern int xcoff_assign_fundamental_type_number (tree); extern void xcoffout_declare_function (FILE *, tree, const char *); -extern void xcoffout_source_line (unsigned int, const char *, int, bool); +extern void xcoffout_source_line (unsigned int, unsigned int, const char *, + int, bool); #endif /* GCC_XCOFFOUT_H */ --- gcc/xcoffout.c.jj 2017-01-01 12:45:39.000000000 +0100 +++ gcc/xcoffout.c 2017-02-17 18:36:30.399361015 +0100 @@ -327,8 +327,8 @@ xcoffout_source_file (FILE *file, const /* Output a line number symbol entry for location (FILENAME, LINE). */ void -xcoffout_source_line (unsigned int line, const char *filename, - int discriminator ATTRIBUTE_UNUSED, +xcoffout_source_line (unsigned int line, unsigned int column ATTRIBUTE_UNUSED, + const char *filename, int discriminator ATTRIBUTE_UNUSED, bool is_stmt ATTRIBUTE_UNUSED) { bool inline_p = (strcmp (xcoff_current_function_file, filename) != 0 @@ -446,6 +446,7 @@ xcoffout_declare_function (FILE *file, t void xcoffout_begin_prologue (unsigned int line, + unsigned int column ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) { ASM_OUTPUT_LFB (asm_out_file, line); --- gcc/vmsdbgout.c.jj 2017-01-01 12:45:39.000000000 +0100 +++ gcc/vmsdbgout.c 2017-02-17 19:13:08.489802300 +0100 @@ -155,9 +155,11 @@ static void vmsdbgout_end_source_file (u static void vmsdbgout_begin_block (unsigned int, unsigned int); static void vmsdbgout_end_block (unsigned int, unsigned int); static bool vmsdbgout_ignore_block (const_tree); -static void vmsdbgout_source_line (unsigned int, const char *, int, bool); +static void vmsdbgout_source_line (unsigned int, unsigned int, const char *, + int, bool); static void vmsdbgout_write_source_line (unsigned, const char *, int , bool); -static void vmsdbgout_begin_prologue (unsigned int, const char *); +static void vmsdbgout_begin_prologue (unsigned int, unsigned int, + const char *); static void vmsdbgout_end_prologue (unsigned int, const char *); static void vmsdbgout_end_function (unsigned int); static void vmsdbgout_begin_epilogue (unsigned int, const char *); @@ -1114,12 +1116,13 @@ write_srccorrs (int dosizeonly) the prologue. */ static void -vmsdbgout_begin_prologue (unsigned int line, const char *file) +vmsdbgout_begin_prologue (unsigned int line, unsigned int column, + const char *file) { char label[MAX_ARTIFICIAL_LABEL_BYTES]; if (write_symbols == VMS_AND_DWARF2_DEBUG) - (*dwarf2_debug_hooks.begin_prologue) (line, file); + (*dwarf2_debug_hooks.begin_prologue) (line, column, file); if (debug_info_level > DINFO_LEVEL_NONE) { @@ -1397,11 +1400,13 @@ vmsdbgout_write_source_line (unsigned li } static void -vmsdbgout_source_line (register unsigned line, register const char *filename, +vmsdbgout_source_line (register unsigned line, unsigned int column, + register const char *filename, int discriminator, bool is_stmt) { if (write_symbols == VMS_AND_DWARF2_DEBUG) - (*dwarf2_debug_hooks.source_line) (line, filename, discriminator, is_stmt); + (*dwarf2_debug_hooks.source_line) (line, column, filename, discriminator, + is_stmt); if (debug_info_level >= DINFO_LEVEL_TERSE) vmsdbgout_write_source_line (line, filename, discriminator, is_stmt); --- gcc/dbxout.c.jj 2017-01-01 12:45:36.000000000 +0100 +++ gcc/dbxout.c 2017-02-17 19:09:20.718711626 +0100 @@ -332,8 +332,9 @@ static void debug_free_queue (void); /* The debug hooks structure. */ #if defined (DBX_DEBUGGING_INFO) -static void dbxout_source_line (unsigned int, const char *, int, bool); -static void dbxout_begin_prologue (unsigned int, const char *); +static void dbxout_source_line (unsigned int, unsigned int, const char *, + int, bool); +static void dbxout_begin_prologue (unsigned int, unsigned int, const char *); static void dbxout_source_file (const char *); static void dbxout_function_end (tree); static void dbxout_begin_function (tree); @@ -1241,7 +1242,9 @@ dbxout_source_file (const char *filename function scope */ static void -dbxout_begin_prologue (unsigned int lineno, const char *filename) +dbxout_begin_prologue (unsigned int lineno, + unsigned int column ATTRIBUTE_UNUSED, + const char *filename) { if (use_gnu_debug_info_extensions && !NO_DBX_FUNCTION_END @@ -1252,7 +1255,7 @@ dbxout_begin_prologue (unsigned int line /* pre-increment the scope counter */ scope_labelno++; - dbxout_source_line (lineno, filename, 0, true); + dbxout_source_line (lineno, 0, filename, 0, true); /* Output function begin block at function scope, referenced by dbxout_block, dbxout_source_line and dbxout_function_end. */ emit_pending_bincls_if_required (); @@ -1263,8 +1266,8 @@ dbxout_begin_prologue (unsigned int line number LINENO. */ static void -dbxout_source_line (unsigned int lineno, const char *filename, - int discriminator ATTRIBUTE_UNUSED, +dbxout_source_line (unsigned int lineno, unsigned int column ATTRIBUTE_UNUSED, + const char *filename, int discriminator ATTRIBUTE_UNUSED, bool is_stmt ATTRIBUTE_UNUSED) { dbxout_source_file (filename);