REG .debug section in elf
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > REG .debug section in elf




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    REG .debug section in elf  
fazlin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

Hi all,

Can anyone explian me in detail about the purpose and format of .debug
section in elf??

Thanks in advance,
Fazlin






[ Post a follow-up to this message ]



    Re: REG .debug section in elf  
Pietro Cerutti


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

fazlin wrote:
> Hi all,
>
> Can anyone explian me in detail about the purpose and format of .debug
> section in elf??

.debug	This section holds information for symbolic debugging.	The
contents are unspecified.  This section is of type
SHT_PROGBITS.  No attribute types are used.

See http://www.freebsd.org/cgi/man.cgi?query=elf

>
> Thanks in advance,
> Fazlin
>


--
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp





[ Post a follow-up to this message ]



    Re: REG .debug section in elf  
fazlin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

On May 21, 7:56 pm, Pietro Cerutti <g...@gahr.ch> wrote:
> fazlin wrote: 
> 
>
> .debug  This section holds information for symbolic debugging.  The
>                 contents are unspecified.  This section is of type
>                 SHT_PROGBITS.  No attribute types are used.
>
> Seehttp://www.freebsd.org/cgi/man.cgi?query=elf
>
>
> 
>
> --
> Pietro Cerutti
>
> PGP Public Key:http://gahr.ch/pgp

Any help on how that section should be interpreted??

Anyway thanks for replyin..

Fazlin






[ Post a follow-up to this message ]



    Re: REG .debug section in elf  
Pietro Cerutti


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

fazlin wrote:
> On May 21, 7:56 pm, Pietro Cerutti <g...@gahr.ch> wrote: 
>
> Any help on how that section should be interpreted??
No, sorry...
The standard says the same ("The contents are unspecified"):
http://refspecs.freestandards.org/e...h4.sheader.html

>
> Anyway thanks for replyin..
>
> Fazlin
>


--
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp





[ Post a follow-up to this message ]



    Re: REG .debug section in elf  
Doug McIntyre


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-21-07 06:19 PM

fazlin <fazlincse@gmail.com> writes:
>On May 21, 7:56 pm, Pietro Cerutti <g...@gahr.ch> wrote: 
[vbcol=seagreen]
>Any help on how that section should be interpreted??


Its not standard, or generalized. Each compiler/enviornment is different.

Ie. Sun C Workshop gives out a bunch of sections..
.debug_info
.debug_line
.debug_abbrev
.debug_pubnames
.debug_typenames
.debug_varnames

GCC doesn't use .debug either, it uses .stab/.stabstr instead on some
platforms.

So, the .debug section contents would only be defined on the specific
enviornment/compiler you are looking at on a specific platform, and
you'd have to look at whatever documentation exists there to see inside.










[ Post a follow-up to this message ]



    Re: REG .debug section in elf  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-22-07 06:18 AM

Doug McIntyre <merlyn@geeks.org> writes:

> Its not standard, or generalized. Each compiler/enviornment is different.

Untrue. There are differences between compilers, but most of them
are slight variations of DWARF2 or DWARF3 debug format.

> Ie. Sun C Workshop gives out a bunch of sections..
>     .debug_info
>     .debug_line
>     .debug_abbrev
>     .debug_pubnames
>     .debug_typenames
>     .debug_varnames

See description of DWARF for what's inside.

> GCC doesn't use .debug either, it uses .stab/.stabstr instead on some
> platforms.

Gcc uses .stab* when it generates STABS debug info ('-gstabs',
'-gstabs+', etc.). Newer gcc releases default to DWARF3 on ELF
platforms:

$ /usr/local/gcc-4.2.0/bin/gcc -g junk.c -c
$ readelf -S junk.o | grep  ' \.debug'
[ 2] .debug_abbrev     PROGBITS        00000000 000123 000047 00      0 
  0  1
[ 3] .debug_info       PROGBITS        00000000 00016a 00009d 00      0 
  0  1
[ 4] .debug_line       PROGBITS        00000000 000207 000076 00      0 
  0  1
[ 6] .debug_frame      PROGBITS        00000000 0002c8 000064 00      0 
  0  4
[ 7] .debug_loc        PROGBITS        00000000 00032c 00005a 00      0 
  0  1
[ 8] .debug_pubnames   PROGBITS        00000000 000386 00002b 00      0 
  0  1
[ 9] .debug_aranges    PROGBITS        00000000 0003b1 000020 00      0 
  0  1

Use 'readelf -w' to decode DWARF .debug* info.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:11 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register