Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* DWARF2 FDE Address Mismatch
@ 2007-06-01 12:20 Matt Kern
  2007-06-01 13:44 ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Kern @ 2007-06-01 12:20 UTC (permalink / raw)
  To: gdb

I am in the process of porting a new MCU/processor to gcc/gdb.  It has a
a Harvard architecture with a 24 bit code address space (word aligned
instructions) and a 16 bit data address space.  Our toolchain emits ELF
binaries with code and data VMAs based at zero.  The program loads as
though it is a ROM image located entirely in code space.

The setup we have gone for involves having all pointers be 16 bits.
Code pointers actually address "trampolines" to the respective
functions.  Our preferred debug format is DWARF2;  we have therefore set
DWARF2_ADDR_SIZE to 4 in order to correctly represent our full range of
code addresses.  Without this setting, addresses are stored as
POINTER_SIZE / BITS_PER_UNIT == 2 bytes.

The output produced by gcc looks to be correct at this juncture.
However, we have problems loading the DWARF2 info in gdb.  Most notably,
gdb defaults cie->encoding to DW_EH_PE_absptr (which is sizeof(void*) ==
2 bytes).   The encoding can be changed by augmentation, but gcc only
emits this for EH data; DWARF2_ADDR_SIZE applies to non-EH data.

In short it looks like GDB DWARF2 support lacks a mechanism to override
the address size (comparable to DWARF2_ADDR_SIZE in gcc).  Is my
understanding correct?

Regards,
Matt


-- 
Matt Kern
http://www.undue.org/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-05 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-01 12:20 DWARF2 FDE Address Mismatch Matt Kern
2007-06-01 13:44 ` Daniel Jacobowitz
2007-06-01 14:26   ` Matt Kern
2007-06-01 14:55     ` Matt Kern
2007-06-01 17:14     ` Daniel Jacobowitz
2007-06-05 10:37       ` Matt Kern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox