public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* gas debugging info vs cpp
@ 2003-03-07  7:01 Roland McGrath
  2003-03-07  7:32 ` Zack Weinberg
  2003-03-07 18:16 ` Ian Lance Taylor
  0 siblings, 2 replies; 4+ messages in thread
From: Roland McGrath @ 2003-03-07  7:01 UTC (permalink / raw)
  To: binutils

I recently became aware of the --gdwarf2/--gstabs options to gas, and was
pleased to find that gcc -g turns the appropriate one on automagically when
you use gcc to run the assembler.  For example, 

	$ gcc -c -g foo.S

et voila, I have a foo.o with perfectly lovely DWARF2 information about
the line numbers in a file called /tmp/ccXQLg55.s!  Mighty handy.

So, I would like to fix this.  The question is, what needs to be fixed?
The assembler can learn to grok cpp # lines, or cpp can learn to emit
assembler .file/.line directives.  

The assembler can't just change, since cpp # lines are assembler comments.
So it would need a switch to tell it to grok cpp # lines.  Then gcc would
need to know to pass this switch, meaning it would need to know it had a
new assembler that knew about that switch.

Conversely, cpp under -lang-asm can start emitting .file and .line
directives instead of # lines.  However, the gas manual says that .file and
.line directives are only recognized for compatibility and might go away.
What's the story with that?  For cpp to get such a change, it would be
important to be sure that all past and future assemblers will grok it properly.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gas debugging info vs cpp
  2003-03-07  7:01 gas debugging info vs cpp Roland McGrath
@ 2003-03-07  7:32 ` Zack Weinberg
  2003-03-07 18:16 ` Ian Lance Taylor
  1 sibling, 0 replies; 4+ messages in thread
From: Zack Weinberg @ 2003-03-07  7:32 UTC (permalink / raw)
  To: Roland McGrath; +Cc: binutils

Roland McGrath <roland@redhat.com> writes:

> Conversely, cpp under -lang-asm can start emitting .file and .line
> directives instead of # lines.  However, the gas manual says that
> .file and .line directives are only recognized for compatibility and
> might go away.  What's the story with that?  For cpp to get such a
> change, it would be important to be sure that all past and future
> assemblers will grok it properly.

By the way, I'm happy to entertain changes to cpplib that would make
it more useful for preprocessing assembly language.  But you have to
tell me exactly what you need from it.

zw

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gas debugging info vs cpp
  2003-03-07  7:01 gas debugging info vs cpp Roland McGrath
  2003-03-07  7:32 ` Zack Weinberg
@ 2003-03-07 18:16 ` Ian Lance Taylor
  2003-03-07 21:23   ` Roland McGrath
  1 sibling, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2003-03-07 18:16 UTC (permalink / raw)
  To: Roland McGrath; +Cc: binutils

Roland McGrath <roland@redhat.com> writes:

> So, I would like to fix this.  The question is, what needs to be fixed?
> The assembler can learn to grok cpp # lines, or cpp can learn to emit
> assembler .file/.line directives.  

The assembler should already recognize cpp # lines if '#' is in
line_comment_chars in the backend tc-*.c file.

What target are you using?

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gas debugging info vs cpp
  2003-03-07 18:16 ` Ian Lance Taylor
@ 2003-03-07 21:23   ` Roland McGrath
  0 siblings, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2003-03-07 21:23 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: binutils

> The assembler should already recognize cpp # lines if '#' is in
> line_comment_chars in the backend tc-*.c file.

Oops.  I was confused by reading the current source though using a build
from a while ago.  This was fixed by nick's 2003-01-29 change.
That's the best answer I could hope for!  Sorry about the misdirection.

> What target are you using?

i686-pc-linux-gnu


Thanks,
Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-07 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07  7:01 gas debugging info vs cpp Roland McGrath
2003-03-07  7:32 ` Zack Weinberg
2003-03-07 18:16 ` Ian Lance Taylor
2003-03-07 21:23   ` Roland McGrath

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).