[llvm-dev] DWARF .debug_aranges data objects and address spaces

Luke Drummond via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 11 08:09:38 PDT 2020


On Tue Mar 10, 2020 at 7:45 PM, David Blaikie wrote:
> If you only want code addresses, why not use the CU's
> low_pc/high_pc/ranges
> - those are guaranteed to be only code addresses, I think?
>
In the common case, for most targets LLVM supports I think you're right,
but for my case, regrettably, not. Because my target is a Harvard
Architecture, any code address can have the same ordinal value as any
data address: the code and data reside on different buses so the whole
4GiB space is available to both code, and data. `DW_AT_low_pc` and
`DW_AT_high_pc` can be used to find the range of the code segment, but
given an arbitrary address, cannot be used to conclusively determine
whether that address belongs to code or data when both segments contain
addresses in that numeric range.

All the Best

Luke

-- 
Codeplay Software Ltd.
Company registered in England and Wales, number: 04567874
Registered office: Regent House, 316 Beulah Hill, London, SE19 3HF


More information about the llvm-dev mailing list