public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Eric Botcazou <botcazou@adacore.com>
To: Alan Modra <amodra@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: PR28149, debug info with wrong file association
Date: Fri, 17 Sep 2021 10:49:20 +0200	[thread overview]
Message-ID: <4678974.31r3eYUQgx@fomalhaut> (raw)
In-Reply-To: <YURShBVDSW1NbqXP@squeak.grove.modra.org>

> A freshly built x86_64-linux mainline gcc compiling this testcase
> 
> asm("nop");
> int main ()
> {
>   return 0;
> }
> 
> ~/build/gcc/gcc/xgcc -B ~/build/gcc/gcc/ -g pr28149.c -v -save-temps
> shows the assembler being invoked with --gdwarf-5 on the following

Your compiler does not seem to be properly configured, here's mine:

	.file	"pr28149.c"
	.text
.Ltext0:
	.file 0 "/home/eric/build/gcc/native" "pr28149.c"
#APP
	nop
#NO_APP
	.globl	main
	.type	main, @function
main:
.LFB0:
	.file 1 "pr28149.c"
	.loc 1 3 1
	.cfi_startproc

Note that there is a fair amount of configury involved on the compiler side to 
detect various binutils quirks:

#if defined(HAVE_AS_GDWARF_5_DEBUG_FLAG) && 
defined(HAVE_AS_WORKING_DWARF_N_FLAG)
  if (output_asm_line_debug_info () && dwarf_version >= 5)

so the assembler must really be detected at configure time.

-- 
Eric Botcazou



  reply	other threads:[~2021-09-17  8:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17  6:56 Alan Modra
2021-09-17  7:05 ` PR28149 part 2, purge generated line info Alan Modra
2021-09-20  2:54   ` PR28149, debug info with wrong file association Alan Modra
2021-09-17  7:25 ` Eric Botcazou
2021-09-17  8:32   ` Alan Modra
2021-09-17  8:49     ` Eric Botcazou [this message]
2021-09-17  9:02       ` Alan Modra
2021-09-17  9:16         ` Eric Botcazou
2021-09-17 11:16           ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4678974.31r3eYUQgx@fomalhaut \
    --to=botcazou@adacore.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).