Lines Matching full:core
31 compiled on an RS/6000 host. -- no archive support, no core files.
64 /* Support for core file stuff.. */
71 #include <sys/core.h>
79 /* AIX 4.1 changed the names and locations of a few items in the core file.
84 CORE_VERSION_1 is defined (by AIX core.h) as 2 on AIX 4.3+ and as 1 on AIX
109 /* Union of old and new core dump structures. */
113 struct core_dumpx new; /* new AIX 4.3+ core dump */
117 struct core_dump old; /* old AIX 4.2- core dump, still used on
242 /* Magic end-of-stack addresses for old core dumps. This is _very_ fragile,
251 /* Size of the leading portion that old and new core dump structures have in
265 /* Try to read into CORE the header from the core file associated with ABFD.
269 read_hdr (bfd *abfd, CoreHdr *core) in read_hdr() argument
276 /* Read the leading portion that old and new core dump structures have in in read_hdr()
279 if (bfd_bread (core, size, abfd) != size) in read_hdr()
283 if (CORE_NEW (*core)) in read_hdr()
284 size = sizeof (core->new); in read_hdr()
286 size = sizeof (core->old); in read_hdr()
288 return bfd_bread ((char *) core + CORE_COMMONSZ, size, abfd) == size; in read_hdr()
310 /* Decide if a given bfd represents a `core' file or not. There really is no
316 CoreHdr core; in rs6000coff_core_p() local
321 /* Values from new and old core structures. */ in rs6000coff_core_p()
329 if (!read_hdr (abfd, &core)) in rs6000coff_core_p()
336 /* Copy fields from new or old core structure. */ in rs6000coff_core_p()
337 if (CORE_NEW (core)) in rs6000coff_core_p()
339 c_flag = core.new.c_flag; in rs6000coff_core_p()
340 c_stack = (file_ptr) core.new.c_stack; in rs6000coff_core_p()
341 c_size = core.new.c_size; in rs6000coff_core_p()
342 c_stackend = CNEW_STACKORG (core.new) + c_size; in rs6000coff_core_p()
343 c_lsize = CNEW_LSIZE (core.new); in rs6000coff_core_p()
344 c_loader = CNEW_LOADER (core.new); in rs6000coff_core_p()
345 proc64 = CNEW_PROC64 (core.new); in rs6000coff_core_p()
349 c_flag = core.old.c_flag; in rs6000coff_core_p()
350 c_stack = (file_ptr) (ptr_to_uint) core.old.c_stack; in rs6000coff_core_p()
351 c_size = core.old.c_size; in rs6000coff_core_p()
354 c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old); in rs6000coff_core_p()
360 c_regsize = sizeof (CNEW_CONTEXT64 (core.new)); in rs6000coff_core_p()
361 c_regptr = &CNEW_CONTEXT64 (core.new); in rs6000coff_core_p()
363 else if (CORE_NEW (core)) in rs6000coff_core_p()
365 c_regsize = sizeof (CNEW_MSTSAVE (core.new)); in rs6000coff_core_p()
366 c_regptr = &CNEW_MSTSAVE (core.new); in rs6000coff_core_p()
370 c_regsize = sizeof (COLD_MSTSAVE (core.old)); in rs6000coff_core_p()
371 c_regptr = &COLD_MSTSAVE (core.old); in rs6000coff_core_p()
373 c_regoff = (char *) c_regptr - (char *) &core; in rs6000coff_core_p()
381 /* If the core file ulimit is too small, the system will first in rs6000coff_core_p()
383 dump core altogether (as far as I know UBLOCK_VALID and LE_VALID in rs6000coff_core_p()
392 if it's not there, we refuse to have anything to do with this core in rs6000coff_core_p()
393 file. The usefulness of a core dump without a stack segment is pretty in rs6000coff_core_p()
409 /* Don't check the core file size for a full core, AIX 4.1 includes in rs6000coff_core_p()
410 additional shared library sections in a full core. */ in rs6000coff_core_p()
422 if (!CORE_NEW (core) && (c_loader < (file_ptr) sizeof core.old || in rs6000coff_core_p()
430 /* Issue warning if the core file was truncated during writing. */ in rs6000coff_core_p()
432 (*_bfd_error_handler) (_("%s: warning core file truncated"), in rs6000coff_core_p()
435 /* Allocate core file header. */ in rs6000coff_core_p()
436 size = CORE_NEW (core) ? sizeof (core.new) : sizeof (core.old); in rs6000coff_core_p()
441 /* Copy core file header. */ in rs6000coff_core_p()
442 memcpy (tmpptr, &core, size); in rs6000coff_core_p()
446 if (CORE_NEW (core)) in rs6000coff_core_p()
451 switch (CNEW_IMPL (core.new)) in rs6000coff_core_p()
481 core dump would require going down the whole list of struct ld_info's. in rs6000coff_core_p()
492 AIX 4 sets FULL_CORE even if the core file is truncated, we have in rs6000coff_core_p()
493 to examine core.c_datasize below to find out the actual size of in rs6000coff_core_p()
499 (bfd_size_type) core.old.c_u.u_dsize, in rs6000coff_core_p()
501 CDATA_ADDR (core.old.c_u.u_dsize), in rs6000coff_core_p()
508 /* AIX 4 adds data sections from loaded objects to the core file, in rs6000coff_core_p()
518 /* Fields from new and old core structures. */ in rs6000coff_core_p()
522 if (CORE_NEW (core)) in rs6000coff_core_p()
524 c_datasize = CNEW_DATASIZE (core.new); in rs6000coff_core_p()
525 c_data = (file_ptr) core.new.c_data; in rs6000coff_core_p()
526 c_vmregions = core.new.c_vmregions; in rs6000coff_core_p()
527 c_vmm = (file_ptr) core.new.c_vmm; in rs6000coff_core_p()
531 c_datasize = core.old.c_datasize; in rs6000coff_core_p()
532 c_data = (file_ptr) (ptr_to_uint) core.old.c_data; in rs6000coff_core_p()
533 c_vmregions = core.old.c_vmregions; in rs6000coff_core_p()
534 c_vmm = (file_ptr) (ptr_to_uint) core.old.c_vmm; in rs6000coff_core_p()
602 size = CORE_NEW (core) ? sizeof (vminfo.new) : sizeof (vminfo.old); in rs6000coff_core_p()
606 if (CORE_NEW (core)) in rs6000coff_core_p()
639 /* Return `TRUE' if given core is from the given executable. */
644 CoreHdr core; in rs6000coff_core_file_matches_executable_p() local
652 if (!read_hdr (core_bfd, &core)) in rs6000coff_core_file_matches_executable_p()
655 if (CORE_NEW (core)) in rs6000coff_core_file_matches_executable_p()
656 c_loader = CNEW_LOADER (core.new); in rs6000coff_core_file_matches_executable_p()
658 c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old); in rs6000coff_core_file_matches_executable_p()
660 if (CORE_NEW (core) && CNEW_PROC64 (core.new)) in rs6000coff_core_file_matches_executable_p()
720 CoreHdr *core = core_hdr (abfd); in rs6000coff_core_file_failing_command() local
721 char *com = CORE_NEW (*core) ? in rs6000coff_core_file_failing_command()
722 CNEW_COMM (core->new) : COLD_COMM (core->old); in rs6000coff_core_file_failing_command()
733 CoreHdr *core = core_hdr (abfd); in rs6000coff_core_file_failing_signal() local
734 return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo; in rs6000coff_core_file_failing_signal()