Re: [git commit] libubacktrace: use -funwind-tables rather than -fexecptions

2012-01-13 Thread Carmelo AMOROSO
On 04/01/2012 23.36, Mike Frysinger wrote:
 On Tuesday 03 January 2012 11:34:40 Carmelo AMOROSO wrote:
 On 01/01/2012 0.10, Mike Frysinger wrote:
 On Thursday 22 December 2011 13:19:22 Carmelo AMOROSO wrote:
 On 22/12/2011 15.30, Carmelo Amoroso wrote:
 For backtrace to work is enough to use -funwind-tables
 instead of -fexceptions.
 
 Indeed, I'm wondering if -fasynchrous-unwind-tables should
 be used rather then funwind-tables. On my arh SH4 the
 generated code is exactly the same. I'm not expert of DWARF,
 neither gcc documentation regarding the differences between
 -fexceptions, -funwind-tables or -fasynchronous-unwind-tables
 helped me so much.
 
 someone else has clearer idea ?
 
 for backtrace, we just want unwind-tables, so using that over 
 -fexceptions is good (since we don't have to handle exceptions
 in this code).  as for the async vs non-async unwind-tables, i
 don't know the answer to that.
 
 I've reported here below the extract from gcc manual. Reading it 
 again, it seems to me that using -fasynchronous-unwind-tables is
 the best as it's purpose is actually to create the dwarf2
 information, in the other two cases (-fexceptions or
 -funwind-tables) it seems to be a side effect.
 
 glibc seems to prefer -fasynchronous-unwind-tables, so that's
 probably good for us too
 
 we need -fexceptions if the funcs themselves need to handle
 exceptions.  but if we only want other things to be able to build a
 backtrace across the call, then -fasynchronous-unwind-tables should
 be sufficient. -mike

agreed. I'll commit an update shortly.

carmelo

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: [git commit] libubacktrace: use -funwind-tables rather than -fexecptions

2012-01-04 Thread Mike Frysinger
On Tuesday 03 January 2012 11:34:40 Carmelo AMOROSO wrote:
 On 01/01/2012 0.10, Mike Frysinger wrote:
  On Thursday 22 December 2011 13:19:22 Carmelo AMOROSO wrote:
  On 22/12/2011 15.30, Carmelo Amoroso wrote:
  For backtrace to work is enough to use -funwind-tables instead
  of -fexceptions.
  
  Indeed, I'm wondering if -fasynchrous-unwind-tables should be
  used rather then funwind-tables. On my arh SH4 the generated code
  is exactly the same. I'm not expert of DWARF, neither gcc
  documentation regarding the differences between -fexceptions,
  -funwind-tables or -fasynchronous-unwind-tables helped me so
  much.
  
  someone else has clearer idea ?
  
  for backtrace, we just want unwind-tables, so using that over
  -fexceptions is good (since we don't have to handle exceptions in
  this code).  as for the async vs non-async unwind-tables, i don't
  know the answer to that.
 
 I've reported here below the extract from gcc manual. Reading it
 again, it seems to me that using -fasynchronous-unwind-tables is the
 best as it's purpose is actually to create the dwarf2 information, in
 the other two cases (-fexceptions or -funwind-tables) it seems to be a
 side effect.

glibc seems to prefer -fasynchronous-unwind-tables, so that's probably good 
for us too

we need -fexceptions if the funcs themselves need to handle exceptions.  but 
if we only want other things to be able to build a backtrace across the call, 
then -fasynchronous-unwind-tables should be sufficient.
-mike


signature.asc
Description: This is a digitally signed message part.
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: [git commit] libubacktrace: use -funwind-tables rather than -fexecptions

2012-01-03 Thread Carmelo AMOROSO
On 01/01/2012 0.10, Mike Frysinger wrote:
 On Thursday 22 December 2011 13:19:22 Carmelo AMOROSO wrote:
 On 22/12/2011 15.30, Carmelo Amoroso wrote:
 commit: 
 http://git.uclibc.org/uClibc/commit/?id=8a8434b367e0b94b9fda72c99f1c6467

 
37725403 branch:
 http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
 
 For backtrace to work is enough to use -funwind-tables instead 
 of -fexceptions.
 
 Signed-off-by: Carmelo Amoroso carmelo.amor...@st.com
 
 Indeed, I'm wondering if -fasynchrous-unwind-tables should be
 used rather then funwind-tables. On my arh SH4 the generated code
 is exactly the same. I'm not expert of DWARF, neither gcc
 documentation regarding the differences between -fexceptions,
 -funwind-tables or -fasynchronous-unwind-tables helped me so
 much.
 
 someone else has clearer idea ?
 
 for backtrace, we just want unwind-tables, so using that over
 -fexceptions is good (since we don't have to handle exceptions in
 this code).  as for the async vs non-async unwind-tables, i don't
 know the answer to that. -mike

Thanks Mike for your feedback.

I've reported here below the extract from gcc manual. Reading it
again, it seems to me that using -fasynchronous-unwind-tables is the
best as it's purpose is actually to create the dwarf2 information, in
the other two cases (-fexceptions or -funwind-tables) it seems to be a
side effect.

Make sense ?

Cheers,
Carmelo


-fexceptions
Enable exception handling. Generates extra code needed to
propagate exceptions. For some targets, this implies GCC will generate
frame unwind information for all functions, which can produce
significant data size overhead, although it does not affect execution.
If you do not specify this option, GCC will enable it by default for
languages like C++ which normally require exception handling, and
disable it for languages like C that do not normally require it.
However, you may need to enable this option when compiling C code that
needs to interoperate properly with exception handlers written in C++.
You may also wish to disable this option if you are compiling older
C++ programs that don't use exception handling.

-funwind-tables
Similar to -fexceptions, except that it will just generate any
needed static data, but will not affect the generated code in any
other way. You will normally not enable this option; instead, a
language processor that needs this handling would enable it on your
behalf.

-fasynchronous-unwind-tables
Generate unwind table in dwarf2 format, if supported by target
machine. The table is exact at each instruction boundary, so it can be
used for stack unwinding from asynchronous events (such as debugger or
garbage collector).
 
 
 
 ___ uClibc-cvs mailing
 list uclibc-...@uclibc.org 
 http://lists.busybox.net/mailman/listinfo/uclibc-cvs

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc