[Dwarf-Discuss] DWARF for DSP like processors with multiple memories

David Earlam David.Earlam at csr.com
Mon Nov 24 10:09:32 PST 2008


For 1, 2 and 3: 
Yes, DW_AT_segment for the memories and DW_AT_address_class for pointers
is one way to encode it.

See for example,

The debugger needs knowledge of the debuggee's mapping
from pragma 'memory-name' to 'segment' number. 
A simple solution is an extra Elf section containing this mapping.

For 4:
There's only one DW_AT_frame_base. Would a callable expression for the
other stacks help ? I assume they each have their own stack
pointer/virtual frame pointer.


> -----Original Message-----
> From: dwarf-discuss-bounces at lists.dwarfstd.org [mailto:dwarf-discuss-
> bounces at lists.dwarfstd.org] On Behalf Of Anthony Berent
> Sent: 24 November 2008 17:21
> To: Dwarf-Discuss at lists.dwarfstd.org
> Cc: Wouter Lievens
> Subject: [Dwarf-Discuss] DWARF for DSP like processors with multiple
> memories
> Hi,
> I am looking for some advice on the correct use of DWARF for
> code
> running on an ARM Data Engine. ARM Data Engines are DSPs with multiple
> memories (not just data and instruction, but multiple data memories),
> independently addressed. The C source code used to program the Data
> Engines
> uses pragmas to assign variables to particular memories, and to
> pointers with the targeted memory. The addresses used within the
> processors
> never include an explicit memory identifier, instead there are
> instructions to access each memory.
> At the moment our DWARF description uses segment attributes
> to describe the allocation of variables to memories, but we are not
> if
> this is a correct use of DWARF. In particular:
> 1.	Is this a reasonable use of DW_AT_segment, which was, I believe,
> originally created for processors with segmented memory of the sort
> implemented in small-mode x86?
> 2.	Is anybody currently using DW_AT_segment in a similar way, or
> solving a similar problem in a different way? If so, for which
> architectures?
> 3.	How should we describe which memory is targeted by pointers? Is
> using the DW_AT_address_class the right way to do this?
> 4.	Is there any way of describing in DWARF which memories contain
> stack? I can't see any way of including segment information in DWARF 3
> call
> frames, and, if I am reading it correctly the DWARF 4 draft I have
> this
> only supports segment information in the PC value in call frames.
> 	*	I say memories (plural) because some ARM Data Engines
> allow certain registers to be saved in particular memories, so we
> sometimes
> need multiple stacks.
> Many thanks for any advice anybody can give.
> - Anthony Berent
> ARM Ltd
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
>  To report this email as spam click
> eavm2PUyStQsdEu+2VppG97OeexGRoDAcloz8rNwSTQ== .

More information about the Dwarf-Discuss mailing list