Bug 3590

Summary: Crash on x86_64 CFI register `rflags' (after glibc update)
Product: frysk Reporter: Jan Kratochvil <jan>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2936, 3076    
Attachments: Fix
Fix (the same), only updated ChangeLog

Description Jan Kratochvil 2006-11-25 16:40:41 UTC
After extending CFI information of glibc's __restore_rt() in:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217087
(Patch still not accepted, this BZ entry may not be required but I still believe
it is a wanted update nonetheless.)

libunwind started to crash with:
run_cfi_program: Invalid register number 49 in DW_cfa_OFFSET

According to http://www.x86-64.org/documentation/abi.pdf page 55 (56/124) it is
really RFLAGS.

Currently RFLAGS or the other registers are not used by libunwind in any way.
Unfortunately it breaks x86_64 ABI of libunwind (by `UNW_TDEP_CURSOR_LEN') but I
believe any stable ABI is currently not cared of by frysk/non-ia64-libunwind.
Comment 1 Jan Kratochvil 2006-11-25 16:44:51 UTC
Created attachment 1437 [details]
Fix

2006-11-25  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* include/libunwind-x86_64.h (UNW_TDEP_CURSOR_LEN): Increased,
	breaks x86_64 libunwind ABI.
	* include/tdep-x86_64/dwarf-config.h (DWARF_NUM_PRESERVED_REGS):
	Increased to support the full x86_64 AMD ABI registers range.
	* src/x86_64/init.h (common_init): New fields set to `DWARF_NULL_LOC'.
	* src/x86_64/regname.c (DE): Support new register names.
Comment 2 Jan Kratochvil 2006-11-25 16:49:10 UTC
Created attachment 1438 [details]
Fix (the same), only updated ChangeLog

2006-11-25  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* include/libunwind-x86_64.h (UNW_TDEP_CURSOR_LEN): Increased,
	breaks x86_64 libunwind ABI.
	* include/tdep-x86_64/dwarf-config.h (DWARF_NUM_PRESERVED_REGS):
	Increased to support the full x86_64 AMD ABI registers range.
	* src/x86_64/init.h (common_init): New registers get `DWARF_NULL_LOC'.
	* src/x86_64/regname.c (regname): Support the new registers.
	* src/x86_64/unwind_i.h: Likewise.