public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Mixed-mode assembler
@ 2004-09-21 15:37 Nick Gianakas
  2004-09-21 15:41 ` Ian Lance Taylor
  2004-09-21 15:47 ` Nathan Sidwell
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Gianakas @ 2004-09-21 15:37 UTC (permalink / raw)
  To: gcc

Does GCC have an option to generate mixed-mode assembler output, similar
to to GDB's mixed-mode output?  I see the -S option stops before the
assembler stage.  Is there another option for GCC to generate this file
w/ the source line above the asm code (commented out, of course)?

Regards,
Nick G.

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

* Re: Mixed-mode assembler
  2004-09-21 15:37 Mixed-mode assembler Nick Gianakas
@ 2004-09-21 15:41 ` Ian Lance Taylor
  2004-09-21 15:47 ` Nathan Sidwell
  1 sibling, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2004-09-21 15:41 UTC (permalink / raw)
  To: Nick Gianakas; +Cc: gcc

Nick Gianakas <gianakas@optonline.net> writes:

> Does GCC have an option to generate mixed-mode assembler output, similar
> to to GDB's mixed-mode output?  I see the -S option stops before the
> assembler stage.  Is there another option for GCC to generate this file
> w/ the source line above the asm code (commented out, of course)?

You can kind of do it using gas, by using
    gcc -c -g -Wa,-ahl FILE.c
That will print the assembly+source listing on stdout.

Ian

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

* Re: Mixed-mode assembler
  2004-09-21 15:37 Mixed-mode assembler Nick Gianakas
  2004-09-21 15:41 ` Ian Lance Taylor
@ 2004-09-21 15:47 ` Nathan Sidwell
  2004-09-21 16:09   ` Nick Gianakas
  1 sibling, 1 reply; 7+ messages in thread
From: Nathan Sidwell @ 2004-09-21 15:47 UTC (permalink / raw)
  To: Nick Gianakas; +Cc: gcc

Nick Gianakas wrote:
> Does GCC have an option to generate mixed-mode assembler output, similar
> to to GDB's mixed-mode output?  I see the -S option stops before the
> assembler stage.  Is there another option for GCC to generate this file
> w/ the source line above the asm code (commented out, of course)?

No, but compiling to .o with -g and use objdump -dS should do the trick.

nathan


-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


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

* Re: Mixed-mode assembler
  2004-09-21 15:47 ` Nathan Sidwell
@ 2004-09-21 16:09   ` Nick Gianakas
  2004-09-21 17:44     ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Gianakas @ 2004-09-21 16:09 UTC (permalink / raw)
  To: Nathan Sidwell; +Cc: gcc

Perfect; thank you.

Any way to control the ASM format (AT&T vs Intel) like w/ GDB?

Regards,
Nick G.

On Tue, 2004-09-21 at 11:13, Nathan Sidwell wrote:
> Nick Gianakas wrote:
> > Does GCC have an option to generate mixed-mode assembler output, similar
> > to to GDB's mixed-mode output?  I see the -S option stops before the
> > assembler stage.  Is there another option for GCC to generate this file
> > w/ the source line above the asm code (commented out, of course)?
> 
> No, but compiling to .o with -g and use objdump -dS should do the trick.
> 
> nathan
> 

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

* Re: Mixed-mode assembler
  2004-09-21 16:09   ` Nick Gianakas
@ 2004-09-21 17:44     ` Ian Lance Taylor
  2004-09-21 20:56       ` Nick Gianakas
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2004-09-21 17:44 UTC (permalink / raw)
  To: Nick Gianakas; +Cc: Nathan Sidwell, gcc

Nick Gianakas <gianakas@optonline.net> writes:

> Perfect; thank you.
> 
> Any way to control the ASM format (AT&T vs Intel) like w/ GDB?

Use the -Mintel or -Matt option (the latter is the default).

Ian

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

* Re: Mixed-mode assembler
  2004-09-21 17:44     ` Ian Lance Taylor
@ 2004-09-21 20:56       ` Nick Gianakas
  2004-09-21 21:13         ` Ian Lance Taylor
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Gianakas @ 2004-09-21 20:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Nathan Sidwell, gcc

> Use the -Mintel or -Matt option (the latter is the default).
I can't seem to find either of those options (GCC 3.4.2).  Have they
been superseded by -masm ?

Regards,
Nick G.


On Tue, 2004-09-21 at 11:55, Ian Lance Taylor wrote:
> Nick Gianakas <gianakas@optonline.net> writes:
> 
> > Perfect; thank you.
> > 
> > Any way to control the ASM format (AT&T vs Intel) like w/ GDB?
> 
> Use the -Mintel or -Matt option (the latter is the default).
> 
> Ian

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

* Re: Mixed-mode assembler
  2004-09-21 20:56       ` Nick Gianakas
@ 2004-09-21 21:13         ` Ian Lance Taylor
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2004-09-21 21:13 UTC (permalink / raw)
  To: Nick Gianakas; +Cc: Nathan Sidwell, gcc

Nick Gianakas <gianakas@optonline.net> writes:

> > Use the -Mintel or -Matt option (the latter is the default).
> I can't seem to find either of those options (GCC 3.4.2).  Have they
> been superseded by -masm ?

I apologize for being unclear.  Those are objdump options, which can
be used when running the disassembler.

If you want gcc to generate Intel syntax in the assembler file which
it generates, use -masm=intel.

Ian

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

end of thread, other threads:[~2004-09-21 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 15:37 Mixed-mode assembler Nick Gianakas
2004-09-21 15:41 ` Ian Lance Taylor
2004-09-21 15:47 ` Nathan Sidwell
2004-09-21 16:09   ` Nick Gianakas
2004-09-21 17:44     ` Ian Lance Taylor
2004-09-21 20:56       ` Nick Gianakas
2004-09-21 21:13         ` Ian Lance Taylor

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