From 4a08b236bd544b1f4e711261d4ae30f05d775105 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 19 Nov 2008 19:03:40 +0000 Subject: [PATCH] - use (unsigned) long instead of ULONG - add DW_CFA_offset_extended_sf svn path=/branches/ros-amd64-bringup/; revision=37462 --- reactos/tools/rsym/dwarf2.h | 26 +++++++++++++------------- reactos/tools/rsym/rsym64.c | 15 ++++++++++----- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/reactos/tools/rsym/dwarf2.h b/reactos/tools/rsym/dwarf2.h index 18ff034f57f..8e9c6120c81 100644 --- a/reactos/tools/rsym/dwarf2.h +++ b/reactos/tools/rsym/dwarf2.h @@ -802,27 +802,27 @@ typedef struct typedef struct { - ULONG Length; + unsigned long Length; char *Next; char *CiePointer; - ULONG PcBegin; - ULONG PcRange; - ULONG AugLength; + unsigned long PcBegin; + unsigned long PcRange; + unsigned long AugLength; char *AugData; char *Instructions; } DW2FDE, *PDW2FDE; typedef struct _CFSTATE { - ULONG Location; - ULONG Code; - ULONG Reg; - ULONG Reg2; - ULONG FramePtr; - ULONG FramePtrDiff; - ULONG Offset; - ULONG IsUwop; - ULONG Scope; + unsigned long Location; + unsigned long Code; + unsigned long Reg; + unsigned long Reg2; + long FramePtr; + long FramePtrDiff; + long Offset; + unsigned long IsUwop; + unsigned long Scope; } DW2CFSTATE, *PDW2CFSTATE; #define NextCIE(p) ((void*)((char*)p + p->Length + 4)) diff --git a/reactos/tools/rsym/rsym64.c b/reactos/tools/rsym/rsym64.c index cc582601cb2..c06a93f729a 100644 --- a/reactos/tools/rsym/rsym64.c +++ b/reactos/tools/rsym/rsym64.c @@ -131,7 +131,7 @@ DwExecIntruction(PDW2CFSTATE State, char *pc) { State->Code = DW_CFA_offset; State->Reg = Code & 0x3f; - Length += DwDecodeUleb128(&State->Offset, pc + 1); + Length += DwDecodeUleb128((unsigned long*)&State->Offset, pc + 1); State->Offset *= 8; // fixme data alignment State->IsUwop = 1; } @@ -162,7 +162,12 @@ DwExecIntruction(PDW2CFSTATE State, char *pc) break; case DW_CFA_offset_extended: Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeUleb128(&State->Offset, pc + Length); + Length += DwDecodeUleb128((unsigned long*)&State->Offset, pc + Length); + State->IsUwop = 1; + break; + case DW_CFA_offset_extended_sf: + Length += DwDecodeUleb128(&State->Reg, pc + Length); + Length += DwDecodeSleb128(&State->Offset, pc + Length); State->IsUwop = 1; break; case DW_CFA_restore_extended: @@ -184,19 +189,19 @@ DwExecIntruction(PDW2CFSTATE State, char *pc) break; case DW_CFA_def_cfa: Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeUleb128(&State->FramePtr, pc + Length); + Length += DwDecodeUleb128((unsigned long*)&State->FramePtr, pc + Length); State->IsUwop = 1; break; case DW_CFA_def_cfa_register: Length += DwDecodeUleb128(&State->Reg, pc + Length); break; case DW_CFA_def_cfa_offset: - Length += DwDecodeUleb128(&State->FramePtr, pc + Length); + Length += DwDecodeUleb128((unsigned long*)&State->FramePtr, pc + Length); State->IsUwop = 1; break; case DW_CFA_def_cfa_sf: Length += DwDecodeUleb128(&State->Reg, pc + Length); - Length += DwDecodeSleb128((LONG*)&State->FramePtr, pc + Length); + Length += DwDecodeSleb128(&State->FramePtr, pc + Length); State->FramePtr *= 8; // data alignment State->IsUwop = 1; break;