Lines Matching refs:descr
87 ShadowAddressDescription descr; in DescribeAddressIfShadow() local
88 if (!GetShadowAddressInformation(addr, &descr)) return false; in DescribeAddressIfShadow()
89 descr.Print(); in DescribeAddressIfShadow()
93 bool GetShadowAddressInformation(uptr addr, ShadowAddressDescription *descr) { in GetShadowAddressInformation() argument
97 if (shadow_kind != kShadowKindGap) descr->shadow_byte = *(u8 *)addr; in GetShadowAddressInformation()
98 descr->addr = addr; in GetShadowAddressInformation()
99 descr->kind = shadow_kind; in GetShadowAddressInformation()
104 static void GetAccessToHeapChunkInformation(ChunkAccess *descr, in GetAccessToHeapChunkInformation() argument
107 descr->bad_addr = addr; in GetAccessToHeapChunkInformation()
108 if (chunk.AddrIsAtLeft(addr, access_size, &descr->offset)) { in GetAccessToHeapChunkInformation()
109 descr->access_type = kAccessTypeLeft; in GetAccessToHeapChunkInformation()
110 } else if (chunk.AddrIsAtRight(addr, access_size, &descr->offset)) { in GetAccessToHeapChunkInformation()
111 descr->access_type = kAccessTypeRight; in GetAccessToHeapChunkInformation()
112 if (descr->offset < 0) { in GetAccessToHeapChunkInformation()
113 descr->bad_addr -= descr->offset; in GetAccessToHeapChunkInformation()
114 descr->offset = 0; in GetAccessToHeapChunkInformation()
116 } else if (chunk.AddrIsInside(addr, access_size, &descr->offset)) { in GetAccessToHeapChunkInformation()
117 descr->access_type = kAccessTypeInside; in GetAccessToHeapChunkInformation()
119 descr->access_type = kAccessTypeUnknown; in GetAccessToHeapChunkInformation()
121 descr->chunk_begin = chunk.Beg(); in GetAccessToHeapChunkInformation()
122 descr->chunk_size = chunk.UsedSize(); in GetAccessToHeapChunkInformation()
123 descr->user_requested_alignment = chunk.UserRequestedAlignment(); in GetAccessToHeapChunkInformation()
124 descr->alloc_type = chunk.GetAllocType(); in GetAccessToHeapChunkInformation()
127 static void PrintHeapChunkAccess(uptr addr, const ChunkAccess &descr) { in PrintHeapChunkAccess() argument
131 switch (descr.access_type) { in PrintHeapChunkAccess()
134 (void *)descr.bad_addr, descr.offset); in PrintHeapChunkAccess()
138 (void *)descr.bad_addr, descr.offset); in PrintHeapChunkAccess()
141 str.append("%p is located %zd bytes inside of", (void *)descr.bad_addr, in PrintHeapChunkAccess()
142 descr.offset); in PrintHeapChunkAccess()
147 (void *)descr.bad_addr); in PrintHeapChunkAccess()
149 str.append(" %zu-byte region [%p,%p)\n", descr.chunk_size, in PrintHeapChunkAccess()
150 (void *)descr.chunk_begin, in PrintHeapChunkAccess()
151 (void *)(descr.chunk_begin + descr.chunk_size)); in PrintHeapChunkAccess()
157 HeapAddressDescription *descr) { in GetHeapAddressInformation() argument
162 descr->addr = addr; in GetHeapAddressInformation()
163 GetAccessToHeapChunkInformation(&descr->chunk_access, chunk, addr, in GetHeapAddressInformation()
166 descr->alloc_tid = chunk.AllocTid(); in GetHeapAddressInformation()
167 descr->alloc_stack_id = chunk.GetAllocStackId(); in GetHeapAddressInformation()
168 descr->free_tid = chunk.FreeTid(); in GetHeapAddressInformation()
169 if (descr->free_tid != kInvalidTid) in GetHeapAddressInformation()
170 descr->free_stack_id = chunk.GetFreeStackId(); in GetHeapAddressInformation()
182 HeapAddressDescription descr; in DescribeAddressIfHeap() local
183 if (!GetHeapAddressInformation(addr, access_size, &descr)) { in DescribeAddressIfHeap()
189 descr.Print(); in DescribeAddressIfHeap()
195 StackAddressDescription *descr) { in GetStackAddressInformation() argument
199 descr->addr = addr; in GetStackAddressInformation()
200 descr->tid = t->tid(); in GetStackAddressInformation()
204 descr->frame_descr = nullptr; in GetStackAddressInformation()
208 descr->offset = access.offset; in GetStackAddressInformation()
209 descr->access_size = access_size; in GetStackAddressInformation()
210 descr->frame_pc = access.frame_pc; in GetStackAddressInformation()
211 descr->frame_descr = access.frame_descr; in GetStackAddressInformation()
217 descr->frame_pc = *reinterpret_cast<uptr *>(descr->frame_pc); in GetStackAddressInformation()
219 descr->frame_pc += 16; in GetStackAddressInformation()
270 StackAddressDescription descr; in DescribeAddressIfStack() local
271 if (!GetStackAddressInformation(addr, access_size, &descr)) return false; in DescribeAddressIfStack()
272 descr.Print(); in DescribeAddressIfStack()
303 GlobalAddressDescription *descr) { in GetGlobalAddressInformation() argument
304 descr->addr = addr; in GetGlobalAddressInformation()
305 int globals_num = GetGlobalsForAddress(addr, descr->globals, descr->reg_sites, in GetGlobalAddressInformation()
306 ARRAY_SIZE(descr->globals)); in GetGlobalAddressInformation()
307 descr->size = globals_num; in GetGlobalAddressInformation()
308 descr->access_size = access_size; in GetGlobalAddressInformation()
314 GlobalAddressDescription descr; in DescribeAddressIfGlobal() local
315 if (!GetGlobalAddressInformation(addr, access_size, &descr)) return false; in DescribeAddressIfGlobal()
317 descr.Print(bug_type); in DescribeAddressIfGlobal()