Lines Matching refs:ctypes
33 import ctypes
78 self.size = ctypes.sizeof(self.ctype)
101 class Raw(ctypes.Structure):
136 byte = ctypes.c_uint8.from_buffer(reader.minidump, slot + i).value
176 ("signature", ctypes.c_uint32),
177 ("version", ctypes.c_uint32),
178 ("stream_count", ctypes.c_uint32),
179 ("stream_directories_rva", ctypes.c_uint32),
180 ("checksum", ctypes.c_uint32),
181 ("time_date_stampt", ctypes.c_uint32),
182 ("flags", ctypes.c_uint64)
186 ("data_size", ctypes.c_uint32),
187 ("rva", ctypes.c_uint32)
191 ("length", ctypes.c_uint32),
192 ("buffer", lambda t: ctypes.c_uint8 * (t.length + 2))
196 ("stream_type", ctypes.c_uint32),
203 ("code", ctypes.c_uint32),
204 ("flags", ctypes.c_uint32),
205 ("record", ctypes.c_uint64),
206 ("address", ctypes.c_uint64),
207 ("parameter_count", ctypes.c_uint32),
208 ("unused_alignment", ctypes.c_uint32),
209 ("information", ctypes.c_uint64 * MD_EXCEPTION_MAXIMUM_PARAMETERS)
213 ("thread_id", ctypes.c_uint32),
214 ("unused_alignment", ctypes.c_uint32),
243 ("control_word", ctypes.c_uint32),
244 ("status_word", ctypes.c_uint32),
245 ("tag_word", ctypes.c_uint32),
246 ("error_offset", ctypes.c_uint32),
247 ("error_selector", ctypes.c_uint32),
248 ("data_offset", ctypes.c_uint32),
249 ("data_selector", ctypes.c_uint32),
250 ("register_area", ctypes.c_uint8 * MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE),
251 ("cr0_npx_state", ctypes.c_uint32)
269 ("context_flags", ctypes.c_uint32),
271 ("dr0", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
272 ("dr1", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
273 ("dr2", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
274 ("dr3", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
275 ("dr6", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
276 ("dr7", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_DEBUG_REGISTERS)),
281 ("gs", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_SEGMENTS)),
282 ("fs", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_SEGMENTS)),
283 ("es", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_SEGMENTS)),
284 ("ds", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_SEGMENTS)),
286 ("edi", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
287 ("esi", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
288 ("ebx", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
289 ("edx", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
290 ("ecx", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
291 ("eax", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_INTEGER)),
293 ("ebp", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
294 ("eip", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
295 ("cs", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
296 ("eflags", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
297 ("esp", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
298 ("ss", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_X86_CONTROL)),
301 EnableOnFlag(ctypes.c_uint8 * MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE,
312 ("fpscr", ctypes.c_uint64),
313 ("regs", ctypes.c_uint64 * MD_FLOATINGSAVEAREA_ARM_FPR_COUNT),
314 ("extra", ctypes.c_uint64 * MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT)
318 ("context_flags", ctypes.c_uint32),
320 ("r0", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
321 ("r1", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
322 ("r2", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
323 ("r3", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
324 ("r4", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
325 ("r5", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
326 ("r6", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
327 ("r7", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
328 ("r8", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
329 ("r9", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
330 ("r10", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
331 ("r11", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
332 ("r12", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
333 ("sp", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
334 ("lr", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
335 ("pc", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_ARM_INTEGER)),
336 ("cpsr", ctypes.c_uint32),
349 ("p1_home", ctypes.c_uint64),
350 ("p2_home", ctypes.c_uint64),
351 ("p3_home", ctypes.c_uint64),
352 ("p4_home", ctypes.c_uint64),
353 ("p5_home", ctypes.c_uint64),
354 ("p6_home", ctypes.c_uint64),
355 ("context_flags", ctypes.c_uint32),
356 ("mx_csr", ctypes.c_uint32),
358 ("cs", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_CONTROL)),
360 ("ds", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_SEGMENTS)),
361 ("es", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_SEGMENTS)),
362 ("fs", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_SEGMENTS)),
363 ("gs", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_SEGMENTS)),
365 ("ss", EnableOnFlag(ctypes.c_uint16, MD_CONTEXT_AMD64_CONTROL)),
366 ("eflags", EnableOnFlag(ctypes.c_uint32, MD_CONTEXT_AMD64_CONTROL)),
368 ("dr0", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
369 ("dr1", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
370 ("dr2", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
371 ("dr3", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
372 ("dr6", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
373 ("dr7", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_DEBUG_REGISTERS)),
375 ("rax", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
376 ("rcx", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
377 ("rdx", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
378 ("rbx", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
380 ("rsp", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_CONTROL)),
382 ("rbp", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
383 ("rsi", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
384 ("rdi", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
385 ("r8", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
386 ("r9", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
387 ("r10", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
388 ("r11", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
389 ("r12", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
390 ("r13", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
391 ("r14", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
392 ("r15", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_INTEGER)),
394 ("rip", EnableOnFlag(ctypes.c_uint64, MD_CONTEXT_AMD64_CONTROL)),
396 ("sse_registers", EnableOnFlag(ctypes.c_uint8 * (16 * 26),
398 ("vector_registers", EnableOnFlag(ctypes.c_uint8 * (16 * 26),
400 ("vector_control", EnableOnFlag(ctypes.c_uint64,
403 ("debug_control", EnableOnFlag(ctypes.c_uint64,
405 ("last_branch_to_rip", EnableOnFlag(ctypes.c_uint64,
407 ("last_branch_from_rip", EnableOnFlag(ctypes.c_uint64,
409 ("last_exception_to_rip", EnableOnFlag(ctypes.c_uint64,
411 ("last_exception_from_rip", EnableOnFlag(ctypes.c_uint64,
416 ("start", ctypes.c_uint64),
421 ("start", ctypes.c_uint64),
422 ("size", ctypes.c_uint64)
426 ("range_count", ctypes.c_uint32),
431 ("range_count", ctypes.c_uint64),
432 ("base_rva", ctypes.c_uint64),
437 ("id", ctypes.c_uint32),
438 ("suspend_count", ctypes.c_uint32),
439 ("priority_class", ctypes.c_uint32),
440 ("priority", ctypes.c_uint32),
441 ("ted", ctypes.c_uint64),
447 ("thread_count", ctypes.c_uint32),
452 ("dwSignature", ctypes.c_uint32),
453 ("dwStrucVersion", ctypes.c_uint32),
454 ("dwFileVersionMS", ctypes.c_uint32),
455 ("dwFileVersionLS", ctypes.c_uint32),
456 ("dwProductVersionMS", ctypes.c_uint32),
457 ("dwProductVersionLS", ctypes.c_uint32),
458 ("dwFileFlagsMask", ctypes.c_uint32),
459 ("dwFileFlags", ctypes.c_uint32),
460 ("dwFileOS", ctypes.c_uint32),
461 ("dwFileType", ctypes.c_uint32),
462 ("dwFileSubtype", ctypes.c_uint32),
463 ("dwFileDateMS", ctypes.c_uint32),
464 ("dwFileDateLS", ctypes.c_uint32)
468 ("base_of_image", ctypes.c_uint64),
469 ("size_of_image", ctypes.c_uint32),
470 ("checksum", ctypes.c_uint32),
471 ("time_date_stamp", ctypes.c_uint32),
472 ("module_name_rva", ctypes.c_uint32),
476 ("reserved0", ctypes.c_uint32 * 2),
477 ("reserved1", ctypes.c_uint32 * 2)
481 ("number_of_modules", ctypes.c_uint32),
486 ("processor_architecture", ctypes.c_uint16)
566 assert ctypes.sizeof(thread_list) == d.location.data_size
575 assert ctypes.sizeof(self.module_list) == d.location.data_size
581 assert ctypes.sizeof(self.memory_list) == d.location.data_size
587 assert ctypes.sizeof(self.memory_list64) == d.location.data_size
595 return ctypes.c_uint8.from_buffer(self.minidump, location).value
599 return ctypes.c_uint32.from_buffer(self.minidump, location).value
603 return ctypes.c_uint64.from_buffer(self.minidump, location).value
619 return ctypes.c_uint64.from_buffer(self.minidump, location).value
621 return ctypes.c_uint32.from_buffer(self.minidump, location).value
623 return ctypes.c_uint32.from_buffer(self.minidump, location).value
629 byte = ctypes.c_uint8.from_buffer(self.minidump, loc).value
650 byte = ctypes.c_uint8.from_buffer(self.minidump, loc).value