From: Frank Ch. Eigler Date: Tue, 28 Apr 1998 20:48:30 +0000 (+0000) Subject: * Fixes for gdb/15371 part 1: assembly source line numbering. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b9180d9168a9596933628af54ecf945b23366d6;p=binutils-gdb.git * Fixes for gdb/15371 part 1: assembly source line numbering. [ChangeLog] Tue Apr 28 11:35:56 1998 Frank Ch. Eigler * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno for line numbers for assembly source. [testsuite/ChangeLog] Tue Apr 28 16:38:34 1998 Frank Ch. Eigler * gas/mips/lineno.[sd]: Assembly source line number test. * gas/mips/mips.exp: Added lineno test. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 9db4077b638..087d068a1fe 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -8,6 +8,11 @@ Tue Apr 28 12:16:30 1998 Ian Lance Taylor (pa_block): Change i to unsigned int. * config/obj-som.h (obj_som_copyright): Declare. +Tue Apr 28 11:35:56 1998 Frank Ch. Eigler + + * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno + for line numbers for assembly source. + Mon Apr 27 15:58:46 1998 Ian Lance Taylor * configure.in: Change version number to 2.9.4 diff --git a/gas/testsuite/gas/mips/lineno.d b/gas/testsuite/gas/mips/lineno.d new file mode 100644 index 00000000000..d2a40f7a44d --- /dev/null +++ b/gas/testsuite/gas/mips/lineno.d @@ -0,0 +1,97 @@ +#objdump: -d -l -mmips:4000 +#name: assembly line numbers +#as: -g -mcpu=r4000 + + +.*: +file format .*mips.* + +Disassembly of section \.text: +0+0000 : +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* + +0+0010
: +main\(\): +.*lineno.s:16 +.*10:.*addiu.* +.*lineno.s:17 +.*14:.*sd.* +.*lineno.s:18 +.*18:.*sd.* +.*lineno.s:19 +.*1c:.*move.* +.*lineno.s:20 +.*20:.*jal.* +.*24:.*nop +.*lineno.s:21 +.*28:.*li.* +.*lineno.s:22 +.*2c:.*sw.* +.*lineno.s:23 +.*30:.*lw.* +.*lineno.s:24 +.*34:.*move.* +.*lineno.s:25 +.*38:.*sll.* +.*lineno.s:26 +.*3c:.*addu.* +.*lineno.s:27 +.*40:.*sw.* +.*lineno.s:28 +.*44:.*lw.* +.*lineno.s:29 +.*48:.*jal.* +.*4c:.*nop +.*lineno.s:30 +.*50:.*lw.* +.*lineno.s:31 +.*54:.*move.* +.*lineno.s:32 +.*58:.*b.* +.*5c:.*nop + +0000000000000060 <\$L1>: +.*lineno.s:34 +.*60:.*move.* +.*lineno.s:35 +.*64:.*ld.* +.*lineno.s:36 +.*68:.*ld.* +.*lineno.s:37 +.*6c:.*addiu.* +.*lineno.s:38 +.*70:.*jr.* +.*74:.*nop + +0000000000000078 : +g\(\): +.*lineno.s:47 +.*78:.*addiu.* +.*lineno.s:48 +.*7c:.*sd.* +.*lineno.s:49 +.*80:.*move.* +.*lineno.s:50 +.*84:.*sw.* +.*lineno.s:51 +.*88:.*lw.* +.*lineno.s:52 +.*8c:.*addiu.* +.*lineno.s:53 +.*90:.*move.* +.*lineno.s:54 +.*94:.*b.* +.*98:.*nop + +000000000000009c <\$L2>: +.*lineno.s:56 +.*9c:.*move.* +.*lineno.s:57 +.*a0:.*ld.* +.*lineno.s:58 +.*a4:.*addiu.* +.*lineno.s:59 +.*a8:.*jr.* +.*ac:.*nop diff --git a/gas/testsuite/gas/mips/lineno.s b/gas/testsuite/gas/mips/lineno.s new file mode 100644 index 00000000000..531f331a4a7 --- /dev/null +++ b/gas/testsuite/gas/mips/lineno.s @@ -0,0 +1,60 @@ + .text + +# some data + .word 0xdeadbeef + .word 0xdeadbeef + .word 0xdeadbeef + .word 0xdeadbeef + +# some real code, compiled from a toy C program + .globl main + .ent main +main: + .frame $fp,32,$31 # vars= 16, regs= 2/0, args= 0, extra= 0 + .mask 0xc0000000,-8 + .fmask 0x00000000,0 + subu $sp,$sp,32 + sd $31,24($sp) + sd $fp,16($sp) + move $fp,$sp + jal __main + li $2,2 # 0x2 + sw $2,0($fp) + lw $2,0($fp) + move $3,$2 + sll $4,$3,1 + addu $2,$4,$2 + sw $2,4($fp) + lw $4,4($fp) + jal g + lw $3,0($fp) + move $2,$3 + b $L1 +$L1: + move $sp,$fp + ld $31,24($sp) + ld $fp,16($sp) + addu $sp,$sp,32 + j $31 + .end main + .align 2 + .globl g + .ent g +g: + .frame $fp,32,$31 # vars= 16, regs= 1/0, args= 0, extra= 0 + .mask 0x40000000,-16 + .fmask 0x00000000,0 + subu $sp,$sp,32 + sd $fp,16($sp) + move $fp,$sp + sw $4,0($fp) + lw $2,0($fp) + addu $3,$2,1 + move $2,$3 + b $L2 +$L2: + move $sp,$fp + ld $fp,16($sp) + addu $sp,$sp,32 + j $31 + .end g