This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: The unwind specification draft for GNU/Linux/ia64


H. J. Lu wrote:
This is the unwind specification draft for GNU/Linux/ia64 which extends the exception ABI:

This seems a little confused about whether it is a GNU/Linux ABI or a GNU/Linux/ia64 ABI. You claim it is an IA-64 ABI in the title, but then you give info for non-IA-64 targets.


I am wondering about buy-in from other IA-64 parties, in particular, the libunwind maintainer David Mosberger. I haven't seen any discussion of this issue on the libunwind mailing list for instance. This is not useful unless libunwind changes at the same time as gcc.

2. A new unwind action:
	const _Unwind_Action _UA_END_OF_STACK = 16;
In order to allow _Unwind_ForcedUnwind to perform special processing when it reaches the end of the stack, the unwind runtime will call it after the last frame is rejected, with the _UA_END_OF_STACK bit in action on, and the stop function must catch this condition (i.e. by noticing that the _UA_END_OF_STACK bit in action is on). It may return this reason code if it cannot handle end-of-stack.

This is badly worded. Part of the trouble here is that you blindly copied a paragraph from the C++ ABI standard which is badly worded, but you made it worse by taking it out of context.


"call it" is ambiguous, because the antecedent is missing. The antecedent is present in the C++ ABI draft, but even there it is ambiguous as there are at least 3 choices for the antecedent. Anyways, this should be "call the stop function".

The requirement that the stop function must handle _UA_END_OF_STACK makes no sense. I see no reason to force everyone to rewrite their stop functions. This makes us not backward compatible with the C++ ABI which has stop functions that won't check for this bit. Instead, this should just say that the stop function may catch this condition, by noticing that the _UA_END_OF_STACK is set.

Also, I'd break up a run on sentence, by splitting the first sentence of this paragraph into two. Replace ", and" with a ".", and capitalize "The stop function". Then there is no need for the i.e or parentheses.

The last sentence has another missing antecedent, and also another ambiguous antecedent. _UA_END_OF_STACK is not a reason code. This should be _URC_END_OF_STACK. This is clear in the C++ ABI.

My suggested rewritten paragraph:

In order to allow _Unwind_ForcedUnwind to perform special processing when it reaches the end of the stack, the unwind runtime will call the stop function after the last frame is rejected, with the _UA_END_OF_STACK bit set. The stop function may catch this condition by noticing that the _UA_END_OF_STACK bit is set. The stop function may return _URC_END_OF_STACK if it cannot handle the end of stack condition.

If there is an existing libgcc-based unwinder in gcc and an unwind library supports gcc, a set of compatibility symbols should be defined.

This is ambiguous. Are the compatibility symbols defined in libgcc or the unwind library?


Those symbols can be used by the new libgcc to provide the backward binary compatibility.

How does this work? If the symbols are defined in libgcc, then this doesn't seem to make sense, so I guess the symbols are supposed to be in the unwind library. But then what does gcc do with the symbols in the unwind library? Does gcc call them if they exist and use its own routines otherwise?
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]