public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dw2 frame unwinder - unaligned access
@ 2005-07-19  5:34 Vasanth
  2005-07-19  6:04 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Vasanth @ 2005-07-19  5:34 UTC (permalink / raw)
  To: gcc

Hi,

With reference to the following info in the EH handling newbie document,

http://gcc.gnu.org/ml/gcc/2002-07/msg00391.html


<snip>
The exception handing via dwarf2 debugging information requires
several things to work:
.........
-Unaligned accesses to read dwarf2 information
</snip>


What is the recommended way to do DW2 frame unwinding based exception
handling for targets that do not support unaligned accesses in
hardware? I did see the documentation about UNALIGNED_INT_ASM_OP, but
not sure if that is meant to generate a directive to the assembler to
produce an aligned int (the name indicates otherwise). Also, I see
UNALIGNED_INT_ASM_OP being used only in the VMS debugging source file.
So I am unsure how it relates to DW2 based frame unwinding.

thanks for any help,

regards,
Vasanth

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

* Re: dw2 frame unwinder - unaligned access
  2005-07-19  5:34 dw2 frame unwinder - unaligned access Vasanth
@ 2005-07-19  6:04 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2005-07-19  6:04 UTC (permalink / raw)
  To: Vasanth; +Cc: gcc

Vasanth <geekvasanth@gmail.com> writes:

> What is the recommended way to do DW2 frame unwinding based exception
> handling for targets that do not support unaligned accesses in
> hardware? I did see the documentation about UNALIGNED_INT_ASM_OP, but
> not sure if that is meant to generate a directive to the assembler to
> produce an aligned int (the name indicates otherwise). Also, I see
> UNALIGNED_INT_ASM_OP being used only in the VMS debugging source file.
> So I am unsure how it relates to DW2 based frame unwinding.

UNALIGNED_INT_ASM_OP tells the assembler to not do any automatic
alignment before emitting the value.  In current development sources
this is TARGET_ASM_UNALIGNED_SI_OP, and it is defined in a number of
config/*/*.c files.

It should not matter that your target does not support unaligned
access in hardware.  The code in read_encoded_value_with_base in
unwind-pe.h should do the right thing, by using a packed union.  On a
target which does not support unaligned access, it will use byte
reads.

If you really do want to insist that all accesses be aligned, it
should work to define ASM_PREFERRED_EH_DATA_FORMAT to be
DW_EH_PE_aligned.

Ian

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

end of thread, other threads:[~2005-07-19  6:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-19  5:34 dw2 frame unwinder - unaligned access Vasanth
2005-07-19  6:04 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).