This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas preprocessor
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: Crni Gorac <cgorac at yahoo dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 15 Jan 2002 14:20:21 +0000
- Subject: Re: gas preprocessor
- References: <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