public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
@ 2011-03-06 15:24 hjl.tools at gmail dot com
2011-03-06 17:20 ` [Bug other/48007] " hjl at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-03-06 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
Summary: Unwind library doesn't work with UNITS_PER_WORD >
sizeof (void *)
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
unwind-dw2.c has
/* This is the register and unwind state for a particular frame. This
provides the information necessary to unwind up past a frame and return
to its caller. */
struct _Unwind_Context
{
void *reg[DWARF_FRAME_REGISTERS+1];
void *cfa;
void *ra;
void *lsda;
struct dwarf_eh_bases bases;
/* Signal frame context. */
#define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1)
/* Context which has version/args_size/by_value fields. */
#define EXTENDED_CONTEXT_BIT ((~(_Unwind_Word) 0 >> 2) + 1)
_Unwind_Word flags;
/* 0 for now, can be increased when further fields are added to
struct _Unwind_Context. */
_Unwind_Word version;
_Unwind_Word args_size;
char by_value[DWARF_FRAME_REGISTERS+1];
};
We can't save an integer register in void * if its size > size of
void *.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
@ 2011-03-06 17:20 ` hjl at gcc dot gnu.org
2011-03-06 21:13 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-03-06 17:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
--- Comment #1 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-03-06 17:20:01 UTC ---
Author: hjl
Date: Sun Mar 6 17:19:57 2011
New Revision: 170716
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170716
Log:
Save call frame hard registers as _Unwind_Word.
2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
PR other/48007
* unwind-dw2.c (_Unwind_Context): Save call frame hard registers
as _Unwind_Word.
(_Unwind_GetGR): Get GR value as _Unwind_Word.
(_Unwind_SetGR): Set GR value as _Unwind_Word.
(_Unwind_SetGRValue): Likewise.
(_Unwind_GetGRPtr): Cast return to "void *".
(_Unwind_SetGRPtr): Cast pointer to _Unwind_Word.
(uw_install_context_1): Cast pointer to "void *".
Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/unwind-dw2.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
2011-03-06 17:20 ` [Bug other/48007] " hjl at gcc dot gnu.org
@ 2011-03-06 21:13 ` pinskia at gcc dot gnu.org
2011-03-06 21:21 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-03-06 21:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-06 21:12:55 UTC ---
Does it matter for the propose of unwinding as all we care about is pointers to
get back to frame before? Your commit might change the ABI for some targets.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
2011-03-06 17:20 ` [Bug other/48007] " hjl at gcc dot gnu.org
2011-03-06 21:13 ` pinskia at gcc dot gnu.org
@ 2011-03-06 21:21 ` hjl.tools at gmail dot com
2011-06-07 17:33 ` hjl at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-03-06 21:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-03-06 21:21:03 UTC ---
X32 glibc force unwind calls _Unwind_SetGRValue to
restore a 64bit register value.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-03-06 21:21 ` hjl.tools at gmail dot com
@ 2011-06-07 17:33 ` hjl at gcc dot gnu.org
2011-08-08 13:27 ` [Bug other/48007] [x32] " hjl at gcc dot gnu.org
2011-08-08 13:31 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-06-07 17:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-06-07 17:33:08 UTC ---
Author: hjl
Date: Tue Jun 7 17:33:05 2011
New Revision: 174760
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174760
Log:
Support UNIQUE_UNWIND_CONTEXT.
2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
PR other/48007
* unwind-dw2.c (UNIQUE_UNWIND_CONTEXT): New.
(_Unwind_Context): If UNIQUE_UNWIND_CONTEXT is defined, add
dwarf_reg_size_table and value, remove version and by_value.
(EXTENDED_CONTEXT_BIT): Don't define if UNIQUE_UNWIND_CONTEXT
is defined.
(_Unwind_IsExtendedContext): Likewise.
(_Unwind_GetGR): Support UNIQUE_UNWIND_CONTEXT.
(_Unwind_SetGR): Likewise.
(_Unwind_GetGRPtr): Likewise.
(_Unwind_SetGRPtr): Likewise.
(_Unwind_SetGRValue): Likewise.
(_Unwind_GRByValue): Likewise.
(__frame_state_for): Initialize dwarf_reg_size_table field if
UNIQUE_UNWIND_CONTEXT is defined.
(uw_install_context_1): Likewise. Support UNIQUE_UNWIND_CONTEXT.
2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
PR other/48007
* unwind-dw2.c (_Unwind_Context): Revert saving call frame hard
registers as _Unwind_Word.
(_Unwind_GetGR): Don't get GR value as _Unwind_Word.
(_Unwind_SetGR): Don't set GR value as _Unwind_Word.
(_Unwind_SetGRValue): Likewise.
(_Unwind_GetGRPtr): Don't cast return to "void *".
(_Unwind_SetGRPtr): Don't cast pointer to _Unwind_Word.
(uw_install_context_1): Don't cast pointer to "void *".
Added:
branches/x32/gcc/ChangeLog.unwind
Modified:
branches/x32/gcc/unwind-dw2.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] [x32] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
` (3 preceding siblings ...)
2011-06-07 17:33 ` hjl at gcc dot gnu.org
@ 2011-08-08 13:27 ` hjl at gcc dot gnu.org
2011-08-08 13:31 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-08-08 13:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
--- Comment #5 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-08-08 13:26:10 UTC ---
Author: hjl
Date: Mon Aug 8 13:26:06 2011
New Revision: 177563
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177563
Log:
Fix Dwarf unwind library for UNITS_PER_WORD > sizeof (void *)
gcc/
2011-08-08 H.J. Lu <hongjiu.lu@intel.com>
PR other/48007
* config.gcc (libgcc_tm_file): Add i386/value-unwind.h for
Linux/x86.
* system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned.
(ASSUME_EXTENDED_UNWIND_CONTEXT): Likewise.
* unwind-dw2.c (ASSUME_EXTENDED_UNWIND_CONTEXT): New.
(_Unwind_Context_Reg_Val): Likewise.
(_Unwind_Get_Unwind_Word): Likewise.
(_Unwind_Get_Unwind_Context_Reg_Val): Likewise.
(_Unwind_Context): Use _Unwind_Context_Reg_Val on the reg field.
(_Unwind_IsExtendedContext): Check ASSUME_EXTENDED_UNWIND_CONTEXT
for EXTENDED_CONTEXT_BIT.
(__frame_state_for): Likewise.
(uw_init_context_1): Likewise.
(_Unwind_GetGR): Updated.
(_Unwind_SetGR): Likewise.
(_Unwind_GetGRPtr): Likewise.
(_Unwind_SetGRPtr): Likewise.
(_Unwind_SetGRValue): Likewise.
(_Unwind_GRByValue): Likewise.
(uw_install_context_1): Likewise.
* doc/tm.texi.in: Document REG_VALUE_IN_UNWIND_CONTEXT and
ASSUME_EXTENDED_UNWIND_CONTEXT.
* doc/tm.texi: Regenerated.
libgcc/
2011-08-08 H.J. Lu <hongjiu.lu@intel.com>
PR other/48007
* config/i386/value-unwind.h: New.
Added:
trunk/libgcc/config/i386/value-unwind.h
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/doc/tm.texi
trunk/gcc/doc/tm.texi.in
trunk/gcc/system.h
trunk/libgcc/ChangeLog
trunk/libgcc/unwind-dw2.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug other/48007] [x32] Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
` (4 preceding siblings ...)
2011-08-08 13:27 ` [Bug other/48007] [x32] " hjl at gcc dot gnu.org
@ 2011-08-08 13:31 ` hjl.tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-08-08 13:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48007
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-08 13:31:12 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-08 13:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-06 15:24 [Bug other/48007] New: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *) hjl.tools at gmail dot com
2011-03-06 17:20 ` [Bug other/48007] " hjl at gcc dot gnu.org
2011-03-06 21:13 ` pinskia at gcc dot gnu.org
2011-03-06 21:21 ` hjl.tools at gmail dot com
2011-06-07 17:33 ` hjl at gcc dot gnu.org
2011-08-08 13:27 ` [Bug other/48007] [x32] " hjl at gcc dot gnu.org
2011-08-08 13:31 ` hjl.tools at gmail dot com
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).