public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: further help on dwarf2 debug
@ 2009-09-24  9:27 Dominique Dhumieres
  2009-09-24 14:01 ` IainS
  0 siblings, 1 reply; 7+ messages in thread
From: Dominique Dhumieres @ 2009-09-24  9:27 UTC (permalink / raw)
  To: gcc; +Cc: developer

With revision 152076 on i686-apple-darwin9 bootstrapped as described
in comment#61 of pr41405, I get:

[ibook-dhum] bug/debug% gcc45 -c -save-temps -dA -g -O0 -fverbose-asm -gno-strict-dwarf simplistic.c
[ibook-dhum] bug/debug% dwarfdump --debug-frame simplistic.o
----------------------------------------------------------------------
 File: simplistic.o (i386)
----------------------------------------------------------------------
.debug_frame contents:

0x00000000: CIE
        length: 0x00000010
        CIE_id: 0xffffffff
       version: 0x01
  augmentation: ""
    code_align: 1
    data_align: -4
   ra_register: 0x08
                DW_CFA_def_cfa (esp, 4)
                DW_CFA_offset (eip, 0)
                DW_CFA_nop
                DW_CFA_nop
  Instructions: Init State: CFA=esp+4     eip=[esp+4]


0x00000014: FDE
        length: 0x00000028
   CIE_pointer: 0x00000000
    start_addr: 0x00000000 testfunc
    range_size: 0x00000012 (end_addr = 0x00000012)
  Instructions: 0x00000000: CFA=esp+4     eip=[esp+4]
                DW_CFA_advance_loc4 (1)
                DW_CFA_def_cfa_offset (8)
                DW_CFA_offset (ebp, -8)
                0x00000001: CFA=esp+8     ebp=[esp]  eip=[esp+8]
                DW_CFA_advance_loc4 (2)
                DW_CFA_def_cfa_register (ebp)
                0x00000003: CFA=ebp+8     ebp=[ebp]  eip=[ebp+8]
                DW_CFA_advance_loc4 (14)
                DW_CFA_restore (ebp)
                DW_CFA_def_cfa (esp, 4)
                DW_CFA_nop
                DW_CFA_nop
                DW_CFA_nop
                0x00000011: CFA=esp+4     ebp=[esp-4]  eip=[esp+4]


(same result with -gstrict-dwarf).

Following Jakub Jelinek's advice (sorry I cannot find the post) I have tried the
tests in gcc/testsuite/gcc.dg/guality/, but did not get any failure.

Cheers,

Dominique

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: further help on dwarf2 debug
  2009-09-24  9:27 further help on dwarf2 debug Dominique Dhumieres
@ 2009-09-24 14:01 ` IainS
  2009-09-24 14:54   ` Jack Howarth
  0 siblings, 1 reply; 7+ messages in thread
From: IainS @ 2009-09-24 14:01 UTC (permalink / raw)
  To: Dominique Dhumieres; +Cc: gcc

On 24 Sep 2009, at 10:27, Dominique Dhumieres wrote:

> With revision 152076 on i686-apple-darwin9 bootstrapped as described
> in comment#61 of pr41405, I get:
>
> [ibook-dhum] bug/debug% gcc45 -c -save-temps -dA -g -O0 -fverbose- 
> asm -gno-strict-dwarf simplistic.c
> [ibook-dhum] bug/debug% dwarfdump --debug-frame simplistic.o
> ----------------------------------------------------------------------
>  File: simplistic.o (i386)
> ----------------------------------------------------------------------
> .debug_frame contents:
>
> <snip>

>                DW_CFA_nop
>                 DW_CFA_nop
>                 0x00000011: CFA=esp+4     ebp=[esp-4]  eip=[esp+4]
> (same result with -gstrict-dwarf).

So, this particular bug appears to be cleared at

dwarfutils-66  or greater.  (confirmed at dwarfutils-70 as well)

(It does not seem to affect powerpc-apple-darwin8 which only has  
dwarfutils-42,
  but I can't speak for i686-apple-darwin-8)

Thanks.  I'll now start to try and track down the orig_sym one.

> Following Jakub Jelinek's advice (sorry I cannot find the post) I  
> have tried the
> tests in gcc/testsuite/gcc.dg/guality/, but did not get any failure.

I'm currently regtesting 152114/i686-apple-darwin9 with my default  
gstrict-dwarf patch and -g{no-,)gstrict-dwarf.

Iain

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: further help on dwarf2 debug
  2009-09-24 14:01 ` IainS
@ 2009-09-24 14:54   ` Jack Howarth
  2009-09-24 15:04     ` IainS
  0 siblings, 1 reply; 7+ messages in thread
From: Jack Howarth @ 2009-09-24 14:54 UTC (permalink / raw)
  To: IainS; +Cc: Dominique Dhumieres, gcc

On Thu, Sep 24, 2009 at 03:01:12PM +0100, IainS wrote:
>
> So, this particular bug appears to be cleared at
>
> dwarfutils-66  or greater.  (confirmed@dwarfutils-70 as well)
>
> (It does not seem to affect powerpc-apple-darwin8 which only has  
> dwarfutils-42,
>  but I can't speak for i686-apple-darwin-8)
>
> Thanks.  I'll now start to try and track down the orig_sym one.
>

Iain,
   What do you mean by the 'bug appears to be cleared'? Can you
map which versions of Xcode on Intel darwin exhibit this bug
and which don't? 
          Jack

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: further help on dwarf2 debug
  2009-09-24 14:54   ` Jack Howarth
@ 2009-09-24 15:04     ` IainS
  2009-09-24 15:20       ` Jack Howarth
  0 siblings, 1 reply; 7+ messages in thread
From: IainS @ 2009-09-24 15:04 UTC (permalink / raw)
  To: Jack Howarth; +Cc: Dominique Dhumieres, gcc


On 24 Sep 2009, at 15:54, Jack Howarth wrote:

> On Thu, Sep 24, 2009 at 03:01:12PM +0100, IainS wrote:
>>
>> So, this particular bug appears to be cleared at
>
> Iain,
>    What do you mean by the 'bug appears to be cleared'? Can you
> map which versions of Xcode on Intel darwin exhibit this bug
> and which don't?


this bug - "fail in dwarfdump --debug-frame" for i686 target

Is present in:
XCode 3.1.2 dwarfutils-49 (IIRC)

In not present in:
XCode 3.1.3  dwarfutils-66 and XCode 3.1.4 dwarfutils-70

--
N.B. this is NOT the "orig_str" Abort in dsymutil (still present in  
library builds on all versions of darwin I've tried).

Iain

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: further help on dwarf2 debug
  2009-09-24 15:04     ` IainS
@ 2009-09-24 15:20       ` Jack Howarth
  0 siblings, 0 replies; 7+ messages in thread
From: Jack Howarth @ 2009-09-24 15:20 UTC (permalink / raw)
  To: IainS; +Cc: Dominique Dhumieres, gcc

On Thu, Sep 24, 2009 at 04:03:28PM +0100, IainS wrote:
>
> this bug - "fail in dwarfdump --debug-frame" for i686 target
>
> Is present in:
> XCode 3.1.2 dwarfutils-49 (IIRC)
>
> In not present in:
> XCode 3.1.3  dwarfutils-66 and XCode 3.1.4 dwarfutils-70
>
> --
> N.B. this is NOT the "orig_str" Abort in dsymutil (still present in  
> library builds on all versions of darwin I've tried).
>
> Iain
>

Iain,
    If this issue doesn't exist with Xcode 2.5 in darwin8, there is
no reason to worry about it. The Darwin maintainers have stated in
the past that it is sufficient for FSF gcc to require the latest
Xcode release for a given darwin version.
                   Jack

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: further help on dwarf2 debug
  2009-09-24  7:36 IainS
@ 2009-09-24 16:42 ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2009-09-24 16:42 UTC (permalink / raw)
  To: IainS; +Cc: GCC Development

On 09/24/2009 12:35 AM, IainS wrote:
> The main difference (and the area causing the tool to barf) is that the
> FDE on 4.5 has some extra information not present in 4.4
>
> .byte 0x4 # DW_CFA_advance_loc4
> .set L$set$6,LCFI3-LCFI1
> .long L$set$6
> .byte 0xc5 # DW_CFA_restore, column 0x5
> .byte 0xc # DW_CFA_def_cfa
> .byte 0x4 # uleb128 0x4
> .byte 0x4 # uleb128 0x4
...
> What is the purpose of the addition?

It describes the operation of the "leave" instruction.

If you set a breakpoint on the "ret" instruction, you now have correct 
unwind information at that spot.  The debugger does not have to resort 
to code inspection to figure out the backtrace.

While gdb and most likely other more robust user-level debuggers *will* 
resort to code inspection (because historically it was necessary), newer 
tools like SystemTap do not; SystemTap is written to work only with the 
debug information.


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

* further help on dwarf2 debug
@ 2009-09-24  7:36 IainS
  2009-09-24 16:42 ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: IainS @ 2009-09-24  7:36 UTC (permalink / raw)
  To: GCC Development

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

I'm trying to formulate a bug report for tools used to examine/ 
process debug output.
looking specifically at the _debug_frame.

for this source:

---
int testfunc(void)
{
	int i;
	i = 1;
	return i;
}

===

using -save-temps -dA -g -O0 -fverbose-asm (-gstrict-dwarf, on 4.5)

comparing the output of gcc-4-4 and trunk.

The main difference (and the area causing the tool to barf) is that  
the FDE on 4.5 has some extra information not present in 4.4

	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$6,LCFI3-LCFI1
	.long L$set$6
	.byte	0xc5	# DW_CFA_restore, column 0x5
	.byte	0xc	# DW_CFA_def_cfa
	.byte	0x4	# uleb128 0x4
	.byte	0x4	# uleb128 0x4


whilst, with the aid of the dwarf3 spec, I can see that this is  
syntactically correct (and confirm that the object file contains the  
correct output).
I can't (at the moment) determine if it's logically correct.
What is the purpose of the addition?
(complete .s files attached)

TIA,
Iain


[-- Attachment #2: simpl-4.4.s.txt --]
[-- Type: text/plain, Size: 11659 bytes --]

	.section __DWARF,__debug_frame,regular,debug
Lsection__debug_frame:
	.section __DWARF,__debug_info,regular,debug
Lsection__debug_info:
	.section __DWARF,__debug_abbrev,regular,debug
Lsection__debug_abbrev:
	.section __DWARF,__debug_aranges,regular,debug
Lsection__debug_aranges:
	.section __DWARF,__debug_macinfo,regular,debug
Lsection__debug_macinfo:
	.section __DWARF,__debug_line,regular,debug
Lsection__debug_line:
	.section __DWARF,__debug_loc,regular,debug
Lsection__debug_loc:
	.section __DWARF,__debug_pubnames,regular,debug
Lsection__debug_pubnames:
	.section __DWARF,__debug_pubtypes,regular,debug
Lsection__debug_pubtypes:
	.section __DWARF,__debug_str,regular,debug
Lsection__debug_str:
	.section __DWARF,__debug_ranges,regular,debug
Lsection__debug_ranges:
# GNU C (GCC) version 4.4.1 20090516 (prerelease) [gcc-4_4-branch revision 147621] (i686-apple-darwin9)
#	compiled by GNU C version 4.4.1 20090516 (prerelease) [gcc-4_4-branch revision 147621], GMP version 4.2.4, MPFR version 2.3.2.
# GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
# options passed:  -fpreprocessed simplistic.i -fPIC
# -feliminate-unused-debug-symbols -mmacosx-version-min=10.5.8
# -mtune=generic -g -O0 -fverbose-asm
# options enabled:  -fPIC -falign-loops -fargument-alias -fauto-inc-dec
# -fbranch-count-reg -fcommon -fearly-inlining
# -feliminate-unused-debug-symbols -feliminate-unused-debug-types
# -ffunction-cse -fgcse-lm -fident -finline-functions-called-once
# -fira-share-save-slots -fira-share-spill-slots -fivopts
# -fkeep-static-consts -fleading-underscore -fmerge-debug-strings
# -fmove-loop-invariants -fpeephole -freg-struct-return -fsched-interblock
# -fsched-spec -fsched-stalled-insns-dep -fsigned-zeros
# -fsplit-ivs-in-unroller -ftrapping-math -ftree-cselim -ftree-loop-im
# -ftree-loop-ivcanon -ftree-loop-optimize -ftree-parallelize-loops=
# -ftree-reassoc -ftree-scev-cprop -ftree-switch-conversion
# -ftree-vect-loop-version -funit-at-a-time -fvect-cost-model -fverbose-asm
# -fzero-initialized-in-bss -m128bit-long-double -m32 -m80387
# -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
# -mfp-ret-in-387 -mfused-madd -mieee-fp -mmmx -mno-red-zone -mno-sse4
# -mpush-args -msahf -msse -msse2

	.section __DWARF,__debug_abbrev,regular,debug
Ldebug_abbrev0:
	.section __DWARF,__debug_info,regular,debug
Ldebug_info0:
	.section __DWARF,__debug_line,regular,debug
Ldebug_line0:
	.text
Ltext0:
# Compiler executable checksum: c0a59a01f5e2b209a6abb15a4aa91764

.globl _testfunc
_testfunc:
LFB0:
	# ../tests/simplistic.c:2
LM1:
	# basic block 2
	pushl	%ebp	#
LCFI0:
	movl	%esp, %ebp	#,
LCFI1:
	subl	$24, %esp	#,
LCFI2:
	# ../tests/simplistic.c:4
LM2:
	movl	$1, -12(%ebp)	#, i
	# ../tests/simplistic.c:5
LM3:
	movl	-12(%ebp), %eax	# i, D.1573
	# ../tests/simplistic.c:6
LM4:
	leave
	ret
LFE0:
	.section __DWARF,__debug_frame,regular,debug
Lframe0:
	.set L$set$0,LECIE0-LSCIE0
	.long L$set$0	# Length of Common Information Entry
LSCIE0:
	.long	0xffffffff	# CIE Identifier Tag
	.byte	0x1	# CIE Version
	.ascii "\0"	# CIE Augmentation
	.byte	0x1	# uleb128 0x1; CIE Code Alignment Factor
	.byte	0x7c	# sleb128 -4; CIE Data Alignment Factor
	.byte	0x8	# CIE RA Column
	.byte	0xc	# DW_CFA_def_cfa
	.byte	0x4	# uleb128 0x4
	.byte	0x4	# uleb128 0x4
	.byte	0x11	# DW_CFA_offset_extended_sf
	.byte	0x8	# uleb128 0x8
	.byte	0x1	# sleb128 1
	.align 2
LECIE0:
LSFDE0:
	.set L$set$1,LEFDE0-LASFDE0
	.long L$set$1	# FDE Length
LASFDE0:
	.set L$set$2,Lframe0-Lsection__debug_frame
	.long L$set$2	# FDE CIE offset
	.long	LFB0	# FDE initial location
	.set L$set$3,LFE0-LFB0
	.long L$set$3	# FDE address range
	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$4,LCFI0-LFB0
	.long L$set$4
	.byte	0xe	# DW_CFA_def_cfa_offset
	.byte	0x8	# uleb128 0x8
	.byte	0x11	# DW_CFA_offset_extended_sf
	.byte	0x5	# uleb128 0x5
	.byte	0x2	# sleb128 2
	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$5,LCFI1-LCFI0
	.long L$set$5
	.byte	0xd	# DW_CFA_def_cfa_register
	.byte	0x5	# uleb128 0x5
	.align 2
LEFDE0:
	.text
Letext0:
	.section __DWARF,__debug_loc,regular,debug
Ldebug_loc0:
LLST0:
	.set L$set$6,LFB0-Ltext0
	.long L$set$6	# Location list begin address (*LLST0)
	.set L$set$7,LCFI0-Ltext0
	.long L$set$7	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x74	# DW_OP_breg4
	.byte	0x4	# sleb128 4
	.set L$set$8,LCFI0-Ltext0
	.long L$set$8	# Location list begin address (*LLST0)
	.set L$set$9,LCFI1-Ltext0
	.long L$set$9	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x74	# DW_OP_breg4
	.byte	0x8	# sleb128 8
	.set L$set$10,LCFI1-Ltext0
	.long L$set$10	# Location list begin address (*LLST0)
	.set L$set$11,LFE0-Ltext0
	.long L$set$11	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x75	# DW_OP_breg5
	.byte	0x8	# sleb128 8
	.long	0x0	# Location list terminator begin (*LLST0)
	.long	0x0	# Location list terminator end (*LLST0)
	.section __DWARF,__debug_info,regular,debug
	.long	0xca	# Length of Compilation Unit Info
	.word	0x2	# DWARF version number
	.set L$set$12,Ldebug_abbrev0-Lsection__debug_abbrev
	.long L$set$12	# Offset Into Abbrev. Section
	.byte	0x4	# Pointer Size (in bytes)
	.byte	0x1	# uleb128 0x1; (DIE (0xb) DW_TAG_compile_unit)
	.ascii "GNU C 4.4.1 20090516 (prerelease) [gcc-4_4-branch revision 147621]\0"	# DW_AT_producer
	.byte	0x1	# DW_AT_language
	.ascii "../tests/simplistic.c\0"	# DW_AT_name
	.ascii "/Volumes/ScratchCS/gcc-4-4-bra-build\0"	# DW_AT_comp_dir
	.long	Ltext0	# DW_AT_low_pc
	.long	Letext0	# DW_AT_high_pc
	.set L$set$13,Ldebug_line0-Lsection__debug_line
	.long L$set$13	# DW_AT_stmt_list
	.byte	0x2	# uleb128 0x2; (DIE (0x97) DW_TAG_subprogram)
	.byte	0x1	# DW_AT_external
	.ascii "testfunc\0"	# DW_AT_name
	.byte	0x1	# DW_AT_decl_file (../tests/simplistic.c)
	.byte	0x1	# DW_AT_decl_line
	.byte	0x1	# DW_AT_prototyped
	.long	0xc6	# DW_AT_type
	.long	LFB0	# DW_AT_low_pc
	.long	LFE0	# DW_AT_high_pc
	.set L$set$14,LLST0-Lsection__debug_loc
	.long L$set$14	# DW_AT_frame_base
	.long	0xc6	# DW_AT_sibling
	.byte	0x3	# uleb128 0x3; (DIE (0xb9) DW_TAG_variable)
	.ascii "i\0"	# DW_AT_name
	.byte	0x1	# DW_AT_decl_file (../tests/simplistic.c)
	.byte	0x3	# DW_AT_decl_line
	.long	0xc6	# DW_AT_type
	.byte	0x2	# DW_AT_location
	.byte	0x91	# DW_OP_fbreg
	.byte	0x6c	# sleb128 -20
	.byte	0x0	# end of children of DIE 0x97
	.byte	0x4	# uleb128 0x4; (DIE (0xc6) DW_TAG_base_type)
	.byte	0x4	# DW_AT_byte_size
	.byte	0x5	# DW_AT_encoding
	.ascii "int\0"	# DW_AT_name
	.byte	0x0	# end of children of DIE 0xb
	.section __DWARF,__debug_abbrev,regular,debug
	.byte	0x1	# uleb128 0x1; (abbrev code)
	.byte	0x11	# uleb128 0x11; (TAG: DW_TAG_compile_unit)
	.byte	0x1	# DW_children_yes
	.byte	0x25	# uleb128 0x25; (DW_AT_producer)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x13	# uleb128 0x13; (DW_AT_language)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x1b	# uleb128 0x1b; (DW_AT_comp_dir)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x11	# uleb128 0x11; (DW_AT_low_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x12	# uleb128 0x12; (DW_AT_high_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x10	# uleb128 0x10; (DW_AT_stmt_list)
	.byte	0x6	# uleb128 0x6; (DW_FORM_data4)
	.byte	0x0
	.byte	0x0
	.byte	0x2	# uleb128 0x2; (abbrev code)
	.byte	0x2e	# uleb128 0x2e; (TAG: DW_TAG_subprogram)
	.byte	0x1	# DW_children_yes
	.byte	0x3f	# uleb128 0x3f; (DW_AT_external)
	.byte	0xc	# uleb128 0xc; (DW_FORM_flag)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x3a	# uleb128 0x3a; (DW_AT_decl_file)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3b	# uleb128 0x3b; (DW_AT_decl_line)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x27	# uleb128 0x27; (DW_AT_prototyped)
	.byte	0xc	# uleb128 0xc; (DW_FORM_flag)
	.byte	0x49	# uleb128 0x49; (DW_AT_type)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x11	# uleb128 0x11; (DW_AT_low_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x12	# uleb128 0x12; (DW_AT_high_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x40	# uleb128 0x40; (DW_AT_frame_base)
	.byte	0x6	# uleb128 0x6; (DW_FORM_data4)
	.byte	0x1	# uleb128 0x1; (DW_AT_sibling)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x0
	.byte	0x0
	.byte	0x3	# uleb128 0x3; (abbrev code)
	.byte	0x34	# uleb128 0x34; (TAG: DW_TAG_variable)
	.byte	0x0	# DW_children_no
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x3a	# uleb128 0x3a; (DW_AT_decl_file)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3b	# uleb128 0x3b; (DW_AT_decl_line)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x49	# uleb128 0x49; (DW_AT_type)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x2	# uleb128 0x2; (DW_AT_location)
	.byte	0xa	# uleb128 0xa; (DW_FORM_block1)
	.byte	0x0
	.byte	0x0
	.byte	0x4	# uleb128 0x4; (abbrev code)
	.byte	0x24	# uleb128 0x24; (TAG: DW_TAG_base_type)
	.byte	0x0	# DW_children_no
	.byte	0xb	# uleb128 0xb; (DW_AT_byte_size)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3e	# uleb128 0x3e; (DW_AT_encoding)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x0
	.byte	0x0
	.byte	0x0
	.section __DWARF,__debug_pubnames,regular,debug
	.long	0x1b	# Length of Public Names Info
	.word	0x2	# DWARF Version
	.set L$set$15,Ldebug_info0-Lsection__debug_info
	.long L$set$15	# Offset of Compilation Unit Info
	.long	0xce	# Compilation Unit Length
	.long	0x97	# DIE offset
	.ascii "testfunc\0"	# external name
	.long	0x0
	.section __DWARF,__debug_aranges,regular,debug
	.long	0x1c	# Length of Address Ranges Info
	.word	0x2	# DWARF Version
	.set L$set$16,Ldebug_info0-Lsection__debug_info
	.long L$set$16	# Offset of Compilation Unit Info
	.byte	0x4	# Size of Address
	.byte	0x0	# Size of Segment Descriptor
	.word	0x0	# Pad to 8 byte boundary
	.word	0x0
	.long	Ltext0	# Address
	.set L$set$17,Letext0-Ltext0
	.long L$set$17	# Length
	.long	0x0
	.long	0x0
	.section __DWARF,__debug_line,regular,debug
	.set L$set$18,LELT0-LSLT0
	.long L$set$18	# Length of Source Line Info
LSLT0:
	.word	0x2	# DWARF Version
	.set L$set$19,LELTP0-LASLTP0
	.long L$set$19	# Prolog Length
LASLTP0:
	.byte	0x1	# Minimum Instruction Length
	.byte	0x1	# Default is_stmt_start flag
	.byte	0xf6	# Line Base Value (Special Opcodes)
	.byte	0xf5	# Line Range Value (Special Opcodes)
	.byte	0xa	# Special Opcode Base
	.byte	0x0	# opcode: 0x1 has 0 args
	.byte	0x1	# opcode: 0x2 has 1 args
	.byte	0x1	# opcode: 0x3 has 1 args
	.byte	0x1	# opcode: 0x4 has 1 args
	.byte	0x1	# opcode: 0x5 has 1 args
	.byte	0x0	# opcode: 0x6 has 0 args
	.byte	0x0	# opcode: 0x7 has 0 args
	.byte	0x0	# opcode: 0x8 has 0 args
	.byte	0x1	# opcode: 0x9 has 1 args
	.ascii "../tests\0"	# Directory Entry: 0x1
	.byte	0x0	# End directory table
	.ascii "simplistic.c\0"	# File Entry: 0x1
	.byte	0x1	# uleb128 0x1
	.byte	0x0	# uleb128 0x0
	.byte	0x0	# uleb128 0x0
	.byte	0x0	# End file name table
LELTP0:
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM1
	.byte	0x15	# line 2
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM2
	.byte	0x16	# line 4
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM3
	.byte	0x15	# line 5
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM4
	.byte	0x15	# line 6
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	Letext0
	.byte	0x0	# DW_LNE_end_sequence
	.byte	0x1	# uleb128 0x1
	.byte	0x1
LELT0:
	.subsections_via_symbols

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



[-- Attachment #4: simpl-4.5.s.txt --]
[-- Type: text/plain, Size: 12323 bytes --]

	.section __DWARF,__debug_frame,regular,debug
Lsection__debug_frame:
	.section __DWARF,__debug_info,regular,debug
Lsection__debug_info:
	.section __DWARF,__debug_abbrev,regular,debug
Lsection__debug_abbrev:
	.section __DWARF,__debug_aranges,regular,debug
Lsection__debug_aranges:
	.section __DWARF,__debug_macinfo,regular,debug
Lsection__debug_macinfo:
	.section __DWARF,__debug_line,regular,debug
Lsection__debug_line:
	.section __DWARF,__debug_loc,regular,debug
Lsection__debug_loc:
	.section __DWARF,__debug_pubnames,regular,debug
Lsection__debug_pubnames:
	.section __DWARF,__debug_pubtypes,regular,debug
Lsection__debug_pubtypes:
	.section __DWARF,__debug_str,regular,debug
Lsection__debug_str:
	.section __DWARF,__debug_ranges,regular,debug
Lsection__debug_ranges:
# GNU C (GCC) version 4.5.0 20090923 (experimental) [trunk revision 152097] (i686-apple-darwin9)
#	compiled by GNU C version 4.5.0 20090923 (experimental) [trunk revision 152097], GMP version 4.3.1, MPFR version 2.4.1
# GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
# options passed:  -fpreprocessed simplistic.i -fPIC
# -feliminate-unused-debug-symbols -mmacosx-version-min=10.5.8
# -mtune=generic -g -O0 -fverbose-asm
# options enabled:  -fPIC -falign-loops -fargument-alias -fauto-inc-dec
# -fbranch-count-reg -fcommon -fdelete-null-pointer-checks -fearly-inlining
# -feliminate-unused-debug-symbols -feliminate-unused-debug-types
# -ffunction-cse -fgcse-lm -fident -finline-functions-called-once
# -fira-share-save-slots -fira-share-spill-slots -fivopts
# -fkeep-static-consts -fleading-underscore -fmerge-debug-strings
# -fmove-loop-invariants -fpeephole -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -ftrapping-math -ftree-cselim -ftree-forwprop
# -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
# -ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc
# -ftree-scev-cprop -ftree-slp-vectorize -ftree-switch-conversion
# -ftree-vect-loop-version -funit-at-a-time -fvect-cost-model -fverbose-asm
# -fzero-initialized-in-bss -gstrict-dwarf -m128bit-long-double -m32
# -m80387 -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
# -mfp-ret-in-387 -mieee-fp -mmmx -mno-red-zone -mno-sse4 -mpush-args
# -msahf -msse -msse2

	.section __DWARF,__debug_abbrev,regular,debug
Ldebug_abbrev0:
	.section __DWARF,__debug_info,regular,debug
Ldebug_info0:
	.section __DWARF,__debug_line,regular,debug
Ldebug_line0:
	.text
Ltext0:
# Compiler executable checksum: b33d0d45a6dc952828668e60336cea35

.globl _testfunc
_testfunc:
LFB0:
	# ../tests/simplistic.c:2
LM1:
	# basic block 2
	pushl	%ebp	#
LCFI0:
	movl	%esp, %ebp	#,
LCFI1:
	subl	$24, %esp	#,
LCFI2:
	# ../tests/simplistic.c:4
LM2:
	movl	$1, -12(%ebp)	#, i
	# ../tests/simplistic.c:5
LM3:
	movl	-12(%ebp), %eax	# i, D.2665
	# ../tests/simplistic.c:6
LM4:
	leave
LCFI3:
	ret
LFE0:
	.section __DWARF,__debug_frame,regular,debug
Lframe0:
	.set L$set$0,LECIE0-LSCIE0
	.long L$set$0	# Length of Common Information Entry
LSCIE0:
	.long	0xffffffff	# CIE Identifier Tag
	.byte	0x1	# CIE Version
	.ascii "\0"	# CIE Augmentation
	.byte	0x1	# uleb128 0x1; CIE Code Alignment Factor
	.byte	0x7c	# sleb128 -4; CIE Data Alignment Factor
	.byte	0x8	# CIE RA Column
	.byte	0xc	# DW_CFA_def_cfa
	.byte	0x4	# uleb128 0x4
	.byte	0x4	# uleb128 0x4
	.byte	0x88	# DW_CFA_offset, column 0x8
	.byte	0x1	# uleb128 0x1
	.align 2
LECIE0:
LSFDE0:
	.set L$set$1,LEFDE0-LASFDE0
	.long L$set$1	# FDE Length
LASFDE0:
	.set L$set$2,Lframe0-Lsection__debug_frame
	.long L$set$2	# FDE CIE offset
	.long	LFB0	# FDE initial location
	.set L$set$3,LFE0-LFB0
	.long L$set$3	# FDE address range
	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$4,LCFI0-LFB0
	.long L$set$4
	.byte	0xe	# DW_CFA_def_cfa_offset
	.byte	0x8	# uleb128 0x8
	.byte	0x85	# DW_CFA_offset, column 0x5
	.byte	0x2	# uleb128 0x2
	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$5,LCFI1-LCFI0
	.long L$set$5
	.byte	0xd	# DW_CFA_def_cfa_register
	.byte	0x5	# uleb128 0x5
	.byte	0x4	# DW_CFA_advance_loc4
	.set L$set$6,LCFI3-LCFI1
	.long L$set$6
	.byte	0xc5	# DW_CFA_restore, column 0x5
	.byte	0xc	# DW_CFA_def_cfa
	.byte	0x4	# uleb128 0x4
	.byte	0x4	# uleb128 0x4
	.align 2
LEFDE0:
	.text
Letext0:
	.section __DWARF,__debug_loc,regular,debug
Ldebug_loc0:
LLST0:
	.set L$set$7,LFB0-Ltext0
	.long L$set$7	# Location list begin address (*LLST0)
	.set L$set$8,LCFI0-Ltext0
	.long L$set$8	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x74	# DW_OP_breg4
	.byte	0x4	# sleb128 4
	.set L$set$9,LCFI0-Ltext0
	.long L$set$9	# Location list begin address (*LLST0)
	.set L$set$10,LCFI1-Ltext0
	.long L$set$10	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x74	# DW_OP_breg4
	.byte	0x8	# sleb128 8
	.set L$set$11,LCFI1-Ltext0
	.long L$set$11	# Location list begin address (*LLST0)
	.set L$set$12,LCFI3-Ltext0
	.long L$set$12	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x75	# DW_OP_breg5
	.byte	0x8	# sleb128 8
	.set L$set$13,LCFI3-Ltext0
	.long L$set$13	# Location list begin address (*LLST0)
	.set L$set$14,LFE0-Ltext0
	.long L$set$14	# Location list end address (*LLST0)
	.word	0x2	# Location expression size
	.byte	0x74	# DW_OP_breg4
	.byte	0x4	# sleb128 4
	.long	0x0	# Location list terminator begin (*LLST0)
	.long	0x0	# Location list terminator end (*LLST0)
	.section __DWARF,__debug_info,regular,debug
	.long	0xc3	# Length of Compilation Unit Info
	.word	0x2	# DWARF version number
	.set L$set$15,Ldebug_abbrev0-Lsection__debug_abbrev
	.long L$set$15	# Offset Into Abbrev. Section
	.byte	0x4	# Pointer Size (in bytes)
	.byte	0x1	# uleb128 0x1; (DIE (0xb) DW_TAG_compile_unit)
	.ascii "GNU C 4.5.0 20090923 (experimental) [trunk revision 152097]\0"	# DW_AT_producer
	.byte	0x1	# DW_AT_language
	.ascii "../tests/simplistic.c\0"	# DW_AT_name
	.ascii "/Volumes/ScratchCS/gcc-4-5-reg-build\0"	# DW_AT_comp_dir
	.long	Ltext0	# DW_AT_low_pc
	.long	Letext0	# DW_AT_high_pc
	.set L$set$16,Ldebug_line0-Lsection__debug_line
	.long L$set$16	# DW_AT_stmt_list
	.byte	0x2	# uleb128 0x2; (DIE (0x90) DW_TAG_subprogram)
	.byte	0x1	# DW_AT_external
	.ascii "testfunc\0"	# DW_AT_name
	.byte	0x1	# DW_AT_decl_file (../tests/simplistic.c)
	.byte	0x1	# DW_AT_decl_line
	.byte	0x1	# DW_AT_prototyped
	.long	0xbf	# DW_AT_type
	.long	LFB0	# DW_AT_low_pc
	.long	LFE0	# DW_AT_high_pc
	.set L$set$17,LLST0-Lsection__debug_loc
	.long L$set$17	# DW_AT_frame_base
	.long	0xbf	# DW_AT_sibling
	.byte	0x3	# uleb128 0x3; (DIE (0xb2) DW_TAG_variable)
	.ascii "i\0"	# DW_AT_name
	.byte	0x1	# DW_AT_decl_file (../tests/simplistic.c)
	.byte	0x3	# DW_AT_decl_line
	.long	0xbf	# DW_AT_type
	.byte	0x2	# DW_AT_location
	.byte	0x91	# DW_OP_fbreg
	.byte	0x6c	# sleb128 -20
	.byte	0x0	# end of children of DIE 0x90
	.byte	0x4	# uleb128 0x4; (DIE (0xbf) DW_TAG_base_type)
	.byte	0x4	# DW_AT_byte_size
	.byte	0x5	# DW_AT_encoding
	.ascii "int\0"	# DW_AT_name
	.byte	0x0	# end of children of DIE 0xb
	.section __DWARF,__debug_abbrev,regular,debug
	.byte	0x1	# uleb128 0x1; (abbrev code)
	.byte	0x11	# uleb128 0x11; (TAG: DW_TAG_compile_unit)
	.byte	0x1	# DW_children_yes
	.byte	0x25	# uleb128 0x25; (DW_AT_producer)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x13	# uleb128 0x13; (DW_AT_language)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x1b	# uleb128 0x1b; (DW_AT_comp_dir)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x11	# uleb128 0x11; (DW_AT_low_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x12	# uleb128 0x12; (DW_AT_high_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x10	# uleb128 0x10; (DW_AT_stmt_list)
	.byte	0x6	# uleb128 0x6; (DW_FORM_data4)
	.byte	0x0
	.byte	0x0
	.byte	0x2	# uleb128 0x2; (abbrev code)
	.byte	0x2e	# uleb128 0x2e; (TAG: DW_TAG_subprogram)
	.byte	0x1	# DW_children_yes
	.byte	0x3f	# uleb128 0x3f; (DW_AT_external)
	.byte	0xc	# uleb128 0xc; (DW_FORM_flag)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x3a	# uleb128 0x3a; (DW_AT_decl_file)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3b	# uleb128 0x3b; (DW_AT_decl_line)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x27	# uleb128 0x27; (DW_AT_prototyped)
	.byte	0xc	# uleb128 0xc; (DW_FORM_flag)
	.byte	0x49	# uleb128 0x49; (DW_AT_type)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x11	# uleb128 0x11; (DW_AT_low_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x12	# uleb128 0x12; (DW_AT_high_pc)
	.byte	0x1	# uleb128 0x1; (DW_FORM_addr)
	.byte	0x40	# uleb128 0x40; (DW_AT_frame_base)
	.byte	0x6	# uleb128 0x6; (DW_FORM_data4)
	.byte	0x1	# uleb128 0x1; (DW_AT_sibling)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x0
	.byte	0x0
	.byte	0x3	# uleb128 0x3; (abbrev code)
	.byte	0x34	# uleb128 0x34; (TAG: DW_TAG_variable)
	.byte	0x0	# DW_children_no
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x3a	# uleb128 0x3a; (DW_AT_decl_file)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3b	# uleb128 0x3b; (DW_AT_decl_line)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x49	# uleb128 0x49; (DW_AT_type)
	.byte	0x13	# uleb128 0x13; (DW_FORM_ref4)
	.byte	0x2	# uleb128 0x2; (DW_AT_location)
	.byte	0xa	# uleb128 0xa; (DW_FORM_block1)
	.byte	0x0
	.byte	0x0
	.byte	0x4	# uleb128 0x4; (abbrev code)
	.byte	0x24	# uleb128 0x24; (TAG: DW_TAG_base_type)
	.byte	0x0	# DW_children_no
	.byte	0xb	# uleb128 0xb; (DW_AT_byte_size)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3e	# uleb128 0x3e; (DW_AT_encoding)
	.byte	0xb	# uleb128 0xb; (DW_FORM_data1)
	.byte	0x3	# uleb128 0x3; (DW_AT_name)
	.byte	0x8	# uleb128 0x8; (DW_FORM_string)
	.byte	0x0
	.byte	0x0
	.byte	0x0
	.section __DWARF,__debug_pubnames,regular,debug
	.long	0x1b	# Length of Public Names Info
	.word	0x2	# DWARF Version
	.set L$set$18,Ldebug_info0-Lsection__debug_info
	.long L$set$18	# Offset of Compilation Unit Info
	.long	0xc7	# Compilation Unit Length
	.long	0x90	# DIE offset
	.ascii "testfunc\0"	# external name
	.long	0x0
	.section __DWARF,__debug_aranges,regular,debug
	.long	0x1c	# Length of Address Ranges Info
	.word	0x2	# DWARF Version
	.set L$set$19,Ldebug_info0-Lsection__debug_info
	.long L$set$19	# Offset of Compilation Unit Info
	.byte	0x4	# Size of Address
	.byte	0x0	# Size of Segment Descriptor
	.word	0x0	# Pad to 8 byte boundary
	.word	0x0
	.long	Ltext0	# Address
	.set L$set$20,Letext0-Ltext0
	.long L$set$20	# Length
	.long	0x0
	.long	0x0
	.section __DWARF,__debug_line,regular,debug
	.set L$set$21,LELT0-LSLT0
	.long L$set$21	# Length of Source Line Info
LSLT0:
	.word	0x2	# DWARF Version
	.set L$set$22,LELTP0-LASLTP0
	.long L$set$22	# Prolog Length
LASLTP0:
	.byte	0x1	# Minimum Instruction Length
	.byte	0x1	# Default is_stmt_start flag
	.byte	0xf6	# Line Base Value (Special Opcodes)
	.byte	0xf5	# Line Range Value (Special Opcodes)
	.byte	0xa	# Special Opcode Base
	.byte	0x0	# opcode: 0x1 has 0 args
	.byte	0x1	# opcode: 0x2 has 1 args
	.byte	0x1	# opcode: 0x3 has 1 args
	.byte	0x1	# opcode: 0x4 has 1 args
	.byte	0x1	# opcode: 0x5 has 1 args
	.byte	0x0	# opcode: 0x6 has 0 args
	.byte	0x0	# opcode: 0x7 has 0 args
	.byte	0x0	# opcode: 0x8 has 0 args
	.byte	0x1	# opcode: 0x9 has 1 args
	.ascii "../tests\0"	# Directory Entry: 0x1
	.byte	0x0	# End directory table
	.ascii "simplistic.c\0"	# File Entry: 0x1
	.byte	0x1	# uleb128 0x1
	.byte	0x0	# uleb128 0x0
	.byte	0x0	# uleb128 0x0
	.byte	0x0	# End file name table
LELTP0:
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM1
	.byte	0x15	# line 2
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM2
	.byte	0x16	# line 4
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM3
	.byte	0x15	# line 5
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	LM4
	.byte	0x15	# line 6
	.byte	0x0	# DW_LNE_set_address
	.byte	0x5	# uleb128 0x5
	.byte	0x2
	.long	Letext0
	.byte	0x0	# DW_LNE_end_sequence
	.byte	0x1	# uleb128 0x1
	.byte	0x1
LELT0:
	.subsections_via_symbols

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-09-24 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-24  9:27 further help on dwarf2 debug Dominique Dhumieres
2009-09-24 14:01 ` IainS
2009-09-24 14:54   ` Jack Howarth
2009-09-24 15:04     ` IainS
2009-09-24 15:20       ` Jack Howarth
  -- strict thread matches above, loose matches on Subject: below --
2009-09-24  7:36 IainS
2009-09-24 16:42 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).