public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@cambridge.redhat.com>
To: Crni Gorac <cgorac@yahoo.com>
Cc: binutils@sources.redhat.com
Subject: Re: gas preprocessor
Date: Tue, 15 Jan 2002 07:06:00 -0000	[thread overview]
Message-ID: <m3r8orvgpm.fsf@north-pole.nickc.cambridge.redhat.com> (raw)
In-Reply-To: <20020113121138.85415.qmail@web14808.mail.yahoo.com>

Hi Crni,

> Is preprocessing support in gas working? Am trying to utilize it
> with gas 2.11.90.0.8 in order to create alias names for functions
> arguments instead of use [ebp+8] etc. (am using Intel syntax). What
> I'm actually looking for is gas equivalent of EQU directive commonly
> found in other (well, at least IA-32) assemblers. I know that I
> could accomplish same using gcc preprocessor but I don't like this
> solution (when debugging code using gdb I have to struggle again
> with [ebp+8] and alike). 

I believe that the short answer to your question is "no".

You can use the .set directive to set up assemble time aliases for
expressions, so you could do:

        .set foo, [ebp+8]

This will not generate a debugging entry however, so you will not be
able to see 'foo' in your GDB sessions.

You might be able to use the register aliasing ability of gcc to solve
your problem however.  For example a declaration like this:

  register int ebp_reg asm ("ebp");

would create a variable called 'ebp_reg' which was mapped onto the ebp
register and which could be viewed inside gdb.

Cheers
        Nick

  reply	other threads:[~2002-01-15 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-13  8:53 Crni Gorac
2002-01-15  7:06 ` Nick Clifton [this message]
2002-01-15 11:11   ` Crni Gorac
2002-01-16  3:37     ` Nick Clifton

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=m3r8orvgpm.fsf@north-pole.nickc.cambridge.redhat.com \
    --to=nickc@cambridge.redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=cgorac@yahoo.com \
    /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).