3.4.1.3 High-level language Listing Option
The -ah
form of this option requests a
high-level language listing. High-level listings require that the assembly source code was
generated by a compiler, a debugging option like -g
was
given to the compiler, and that assembly listings (-al
)
are also requested. -al
requests an output program
assembly listing. The following example shows a listing that was generated using the
-alh
command line option.
Listing File Generated With -alh
Command Line Option
GAS LISTING tempfile.s page 1
1 .section .mdebug.abi32
2 .previous
3 .section .debug_abbrev,"",@progbits
4 .Ldebug_abbrev0:
5 .section .debug_info,"",@progbits
6 .Ldebug_info0:
7 .section .debug_line,"",@progbits
8 .Ldebug_line0:
9 0000 34000000 .text
11 .align 2
12 .globl main
13 .LFB0:
14 .file 1 "src/test.c"
1:src/test.c **** #include <xc.h>
2:src/test.c **** volatile unsigned int testval;
3:src/test.c ****
4:src/test.c **** int
5:src/test.c **** main (void)
6:src/test.c **** {
15 .loc 1 6 0
16 .set nomips16
17 .ent main
18 main:
19 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0
20 .mask 0x00000000,0
21 .fmask 0x00000000,0
22 .set noreorder
23 .set nomacro
24
7:src/test.c **** testval += 1;
25 .loc 1 7 0
26 0000 0000848F lw $4,%gp_rel(testval)($28)
8:src/test.c **** return 0;
9:src/test.c **** }
27 .loc 1 9 0
28 0004 21100000 move $2,$0
29 .loc 1 7 0
30 0008 01008324 addiu $3,$4,1
31 000c 000083AF sw $3,%gp_rel(testval)($28)
32 .loc 1 9 0
33 0010 0800E003 j $31
34 0014 00000000 nop
35
36 .set macro
37 .set reorder
38 .end main
39 .LFE0:
40 .size main, .-main
41
42 .comm testval,4,4