From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24259 invoked by alias); 12 Aug 2009 13:21:14 -0000 Received: (qmail 24207 invoked by uid 22791); 12 Aug 2009 13:21:13 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-gx0-f211.google.com (HELO mail-gx0-f211.google.com) (209.85.217.211) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Aug 2009 13:21:07 +0000 Received: by gxk7 with SMTP id 7so1884gxk.8 for ; Wed, 12 Aug 2009 06:21:05 -0700 (PDT) Received: by 10.90.32.4 with SMTP id f4mr57282agf.7.1250083264933; Wed, 12 Aug 2009 06:21:04 -0700 (PDT) Received: from yakj.usersys.redhat.com ([72.14.241.8]) by mx.google.com with ESMTPS id 20sm2500982agb.35.2009.08.12.06.21.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 12 Aug 2009 06:21:04 -0700 (PDT) Message-ID: <4A82C1BE.6050507@gnu.org> Date: Wed, 12 Aug 2009 15:27:00 -0000 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: Paul Edwards CC: Ulrich Weigand , gcc@gcc.gnu.org Subject: Re: i370 port References: <200908111348.n7BDmooM002811@d12av02.megacenter.de.ibm.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00193.txt.bz2 >> In any case, if you build with -g and use in addition the "debug >> assembler output" flag -dA the assembler output should contain >> human-readable comments containing line number information. > > Regardless, if line number notes are interspersed in the stream, > maybe whenever I write out an assembler instruction I will have > access to those notes and can print out a comment. No, that might break when you upgrade later. GCC already has support for annotating the assembly output with human-readable line number info. That is option -dA as Ulrich pointed out. Only DWARF-2 output supports it currently, but if you want to use it say together with STABS, it is just a matter of modifying dbxout_source_line and add a single statement like this: if (flag_debug_asm) fprintf (asm_out_file, "\t%s %s:%d\n", ASM_COMMENT_START, filename, line); Paolo