List Info

Thread: elf core file format for powerpc




elf core file format for powerpc
country flaguser name
India
2008-02-05 07:07:08
GUYS,

 

    I AM WORKING ON EMBEDDED SYSTEM (POWERPC BASED). I TRY
TO COLLECT THE MEMORY DUMP OVER THE UART AND SAVE IT TO
FILE.

NEXT, I CONVERT THIS RAW DATA TO THE CORE FILE AND TRY TO
ANALYSE THE CONTENTS OF VARIOUS GLOBAL VARIABLES. GDB SHOWS
PERFECT RESULTS FOR ALL THE VARIABLES IN .DATA AND .BSS
SECTIONS.

HOWEVER, I DO NOT KNOW HOW TO SEE THE VALUES OF VARIOUS
GENERAL PURPOSE REGISTERS AND STACK DUMP.

I GENERALLY GET THE FOLLOWING MESSAGE:

WARNING: COULDN'T FIND GENERAL-PURPOSE REGISTERS IN CORE
FILE

IT LOOKS THAT THE GDB TRY TO FIND THE ".REG"
SECTION IN THE CORE FILE, BUT IT COULDN'T FIND IT. I TRIED
ADDING A .REG SECTION WITH THE REGISTER CONTENTS, STILL I
GET THE SAME ERROR MESSAGE.

IS THERE ANT UTILITY BY WHICH I CAN ADD A ".REG"
SECTION TO THE COREFILE.

ALSO, IS ANYONE AWARE OF ANY LINK THAT DESCRIBES THE CORE
FILE FORMAT (ELF, LINUX OVER POWERPC) ?  I PARTICULARY NEED
INFORMATION ABOUT "NOTE0, .REG, .REG2" SECTIONS.

ALSO, IS THE CODE FOR "GCORE" AVAILABLE ON THE
INTERNET. I NEED THE SOURCE CODE FOR "GCORE" THAT
CREATES A CORE FILE IN ELF FORMAT AND ALSO ADDS SECTIONS
"NOTE0, .REG, .REG2".
 

I WOULD BE HIGHLY GRATEFUL FOR ANY HELP/POINTERS.

THANKS A LOT...... 



      FORGOT THE FAMOUS LAST WORDS? ACCESS YOUR MESSAGE
ARCHIVE ONLINE AT
HTTP://IN.MESSENGER.YAHOO.COM/WEBMESSENGERPROMO.PHP

Re: elf core file format for powerpc
country flaguser name
United States
2008-02-05 07:19:27
On Tue, Feb 05, 2008 at 06:37:08PM +0530, rahul dev wrote:
> Also, is anyone aware of any link that describes the
core file format (elf, linux over powerpc) ?  I particulary
need information about "note0, .reg, .reg2"
sections.

You're using objdump; try using readelf instead.  That gives
a more
accurate picture of the contents.  Then read the ELF gABI
which
describes the format of core files.

> Also, is the code for "gcore" available on
the internet. I need the
> source code for "gcore" that creates a core
file in elf format and
> also adds sections "note0, .reg, .reg2".

Of course it is.  It's in the source package for GDB.  But
it uses the
BFD library, so it's a little complicated to find out where
each piece
is implemented.

-- 
Daniel Jacobowitz
CodeSourcery

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )