RE: dynamic array's upper bound evaluated as address for AVR target

"Sivanupandi, Pitchumani" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAC140656783604CABA6AE60C2A6D5A4A2ED24E7@penmbx01>
> -----Original Message-----
> From: Pierre-Marie de Rodat [mailto:[email protected]]
> Sent: 14 October 2015 13:56
> To: Sivanupandi, Pitchumani; Joel Brobecker
> Cc: [email protected]; Andrew Burgess; [email protected]; [email protected]
> Subject: Re: dynamic array's upper bound evaluated as address for AVR target
> 
> On 10/14/2015 09:54 AM, Sivanupandi, Pitchumani wrote:
> > It is not meant for integer to address conversion, rather transforming
> > the location expression value as target address
> > (value.c:value_as_address) if target has some special handling. In AVR
> > case, to differentiate the memory type (flash, sram, eeprom) we have
> > this mask so that debugger can identify the correct memory type from that
> address.
> 
> Thank you for your answers, and sorry for the new questions, I just try to
> understand both the need and the solution in place for it. ;-)
> 
> If all these memories share the same address space, why don’t location
> expressions (so compiler generated) compute directly masked addresses?
> What addresses does the inferior processes? (like: in registers, etc.) are
> these masked as well?

AVR has different address spaces (Harvard architecture). Compiler
(avr-gcc) generates fictitious addresses to support it.
Also refer:
AVR Background in avr-tdep.c
https://sourceware.org/ml/gdb/2014-10/msg00142.html

Regards,
Pitchumani
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.