Bug 2243 - [tracker] fcore: standalone program for extracing a core file
Summary: [tracker] fcore: standalone program for extracing a core file
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Phil Muldoon
URL:
Keywords:
: 3075 (view as bug list)
Depends on: 3330 3752 3841 5773 5820 5967 3370 3371 3373 3374 3388 3408 3481 3647 3650 3651 3667 3697 3703 3727 4004 4316 4679 4967 5095 5177 5211 5683
Blocks: 1601
  Show dependency treegraph
 
Reported: 2006-01-31 17:39 IST by Andrew Cagney
Modified: 2008-01-28 02:22 IST (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-01-31 17:39:48 IST
fcore <pid>
Would like, all the other variants, extract a core file from a running process.
Comment 1 Wu Zhou 2006-09-28 15:48:42 IST
just like gcore does, right?  That is interesting.
Comment 2 Wu Zhou 2006-09-28 15:55:53 IST
*** Bug 3075 has been marked as a duplicate of this bug. ***
Comment 3 Phil Muldoon 2006-10-13 02:33:40 IST
2006-10-11  Phil Muldoon  <pmuldoon@redhat.com>
	
	* cni/Elf.cxx: (elf_begin): Check args to allow writing to
	elf files.
	(elf_get_last_error_msg): New.
	(elf_get_last_error_no): New.
	(elf_updatehdr): New.
	(elf_init_core_header): New. Temporary.
	(elf_updatephdr): New.
	
	* Elf.java (Elf): Add a boolean constructor switch
	for write/read.
	(updateEHeader): New. Write Elf header back to native
	structure.
	(initializeCoreHeader): Temporary. Convienience function.
	(updatePHeader): New. Write the program segment back to native
	structure.
	(getLastErrorMsg): New. Get the error message corresponding to
	entry below.
	(getLastErrorNo): New. Get the error number set if the last
	elf function failed.

2006-10-12  Phil Muldoon  <pmuldoon@redhat.com>
	
	* FCore.java: Added. Initial, experimental and incomplete utility to
	dump process core in frysk.
Comment 4 Phil Muldoon 2006-10-15 22:00:56 IST
2006-10-15  Phil Muldoon  <pmuldoon@redhat.com>
    
    * frysk/util/FCore.java (write_elf_file): Rewritten with these changes:
    - Build elf header manually with full complement of data.
    - Build string table section/section header and update to disk.
    - (Still) Ugly arch test hack.
    * frysk/util/FCore.java (FCore.MapsCounter): Renamed.
    * frysk/util/FCore.java (FCore.CoreMapsBuilder): Renamed.
    (buildMap):Rewritten with these changes:
    - build section headers
    - define section headers in concert with program headers.
    - build section from header, create contextual Elf_Data class, and
    byte copy maps data.



2006-10-15  Phil Muldoon  <pmuldoon@redhat.com>
    
    * Elf.java (getElfVersion): New function.
    (initializeCoreHeader): Remove. Deprecated.
    * ElfData.java (setBuffer): New function. Set elf buffer.
    (setType): New.
    (setSize): New.
    (setOffset): New.
    * ElfEHeader.java: Added Data, Class and Type constants.
    * ElfPHeader.java : Added Type constants.
    * ElfSection (update):  New Function. Update class
    back to native elf header.
    * ElfSectionHeader.java: Changed constructor access to public.
    * ElfSectionHeaderTypes.java : New.
    
    * cni/Elf.cxx (elf_init_core_header): Removed. Deprecated.
    * cni/ElfData.cxx (elf_data_set_buff): New function.
    (elf_data_set_type): Ditto.
    (elf_data_set_version): Ditto.
    (elf_data_set_size): Ditto.
    (elf_data_set_off): Ditto.
    (elf_data_set_align): Ditto.
    * cni/ElfSection.cxx:
    (ElfSection): Check if ehdr->e_shstrndx exists before
    attempting to calculate name from string table.
    (elf_updateshdr): New.
Comment 5 Andrew Cagney 2006-10-18 18:26:00 IST
Leave in new/assigned state until the command is mostly there, after that bug
can be SUSPENDED and additional problems hung off of this bug.