From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31024 invoked by alias); 7 Jan 2004 23:47:53 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31010 invoked from network); 7 Jan 2004 23:47:48 -0000 Received: from unknown (HELO nick.uklinux.net) (194.247.51.202) by sources.redhat.com with SMTP; 7 Jan 2004 23:47:48 -0000 Received: by nick.uklinux.net (Postfix, from userid 501) id 9072975FDE; Wed, 7 Jan 2004 23:39:26 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16380.39085.925231.676927@nick.uklinux.net> Date: Wed, 07 Jan 2004 23:47:00 -0000 To: cagney@gnu.org, mec.gnu@mindspring.com (Michael Elizabeth Chastain), kettenis@chello.nl Cc: gdb-patches@sources.redhat.com, Subject: Re: [PATCH: gdb/mi] -stack-list-locals testcase In-Reply-To: <20040107210659.3EDDE4B35A@berman.michael-chastain.com> References: <20040107210659.3EDDE4B35A@berman.michael-chastain.com> X-SW-Source: 2004-01/txt/msg00184.txt.bz2 > Nick, what's your exact system? On amd64 and i386 GNU/Linux systems > (RHEL 3, dwarf 2, gcc 2.3.2 based) mi-stack.exp I'm also seeing this > pass (puzzled). gcc 2.3.2? nick:{nick}44: uname -a Linux nick.uklinux.net 2.4.19-16mdk #1 Fri Sep 20 18:15:05 CEST 2002 i586 unknown (Mandrake 9, dwarf-2, gcc 3.2) > mark> I think it would be useful if Nick could post the output from "objdump > mark> --stabs" on the generated binary... I think my system uses dwarf-2 (whatever that is) by default. If I recompile with `cc -gstabs -o basics basics.c', break callee4 still breaks on line 7 (which is an opening curly bracket, testsuite expects it to break on line 8). Then: nick:{nick}21: objdump --stabs basics basics: file format elf32-i386 Contents of .stab section: Symnum n_type n_othr n_desc n_value n_strx String -1 HdrSym 0 62 00000397 1 0 SO 0 0 0804833c 1 basics.c 1 OPT 0 0 00000000 10 gcc2_compiled. 2 LSYM 0 0 00000000 25 int:t(0,1)=r(0,1);-2147483648;2147483647; 3 LSYM 0 0 00000000 67 char:t(0,2)=r(0,2);0;127; 4 LSYM 0 0 00000000 93 long int:t(0,3)=r(0,3);-2147483648;2147483647; 5 LSYM 0 0 00000000 140 unsigned int:t(0,4)=r(0,4);0;-1; 6 LSYM 0 0 00000000 173 long unsigned int:t(0,5)=r(0,5);0;-1; 7 LSYM 0 0 00000000 211 long long int:t(0,6)=r(0,6);0;-1; 8 LSYM 0 0 00000000 245 long long unsigned int:t(0,7)=r(0,7);0;-1; 9 LSYM 0 0 00000000 288 short int:t(0,8)=r(0,8);-32768;32767; 10 LSYM 0 0 00000000 326 short unsigned int:t(0,9)=r(0,9);0;65535; 11 LSYM 0 0 00000000 368 signed char:t(0,10)=r(0,10);-128;127; 12 LSYM 0 0 00000000 406 unsigned char:t(0,11)=r(0,11);0;255; 13 LSYM 0 0 00000000 443 float:t(0,12)=r(0,1);4;0; 14 LSYM 0 0 00000000 469 double:t(0,13)=r(0,1);8;0; 15 LSYM 0 0 00000000 496 long double:t(0,14)=r(0,1);12;0; 16 LSYM 0 0 00000000 529 complex int:t(0,15)=s8real:(0,1),0,32;imag:(0,1),32,32;; 17 LSYM 0 0 00000000 586 complex float:t(0,16)=r(0,16);8;0; 18 LSYM 0 0 00000000 621 complex double:t(0,17)=r(0,17);16;0; 19 LSYM 0 0 00000000 658 complex long double:t(0,18)=r(0,18);24;0; 20 LSYM 0 0 00000000 700 __builtin_va_list:t(0,19)=*(0,2) 21 LSYM 0 0 00000000 733 _Bool:t(0,20)=eFalse:0,True:1,; 22 BINCL 0 0 00003137 1 basics.c 23 FUN 0 0 0804833c 765 callee4:F(0,1) 24 SLINE 0 7 00000000 0 25 SLINE 0 8 00000003 0 26 SLINE 0 9 0000000b 0 27 SLINE 0 12 00000013 0 28 SLINE 0 13 0000001e 0 29 SLINE 0 14 00000023 0 30 LSYM 0 0 00000008 780 A:(0,1) 31 LSYM 0 0 00000004 788 B:(0,1) 32 LSYM 0 0 00000000 796 C:(0,1) 33 LBRAC 0 0 00000000 0 34 RBRAC 0 0 00000023 0 35 FUN 0 0 08048364 804 callee3:F(0,1) 36 PSYM 0 0 00000008 819 strarg:p(0,19) 37 SLINE 0 16 00000000 0 38 SLINE 0 17 00000006 0 39 SLINE 0 18 0000000b 0 40 FUN 0 0 08048372 834 callee2:F(0,1) 41 PSYM 0 0 00000008 849 intarg:p(0,1) 42 PSYM 0 0 0000000c 819 strarg:p(0,19) 43 SLINE 0 21 00000000 0 44 SLINE 0 22 00000006 0 45 SLINE 0 23 00000014 0 46 FUN 0 0 08048388 863 callee1:F(0,1) 47 PSYM 0 0 00000008 849 intarg:p(0,1) 48 PSYM 0 0 0000000c 819 strarg:p(0,19) 49 PSYM 0 0 00000010 878 fltarg:p(0,13) 50 SLINE 0 26 00000000 0 51 SLINE 0 27 00000012 0 52 SLINE 0 28 00000023 0 53 LSYM 0 0 fffffff8 893 fltarg:(0,13) 54 FUN 0 0 080483ae 907 main:F(0,1) 55 SLINE 0 31 00000000 0 56 SLINE 0 32 00000010 0 57 SLINE 0 33 00000026 0 58 SLINE 0 35 0000003c 0 59 SLINE 0 37 0000004c 0 60 SLINE 0 38 00000051 0 61 SO 0 0 08048401 0 > mark> ...The output of "gcc -g -S" on the > mark> relevant source file would be even more useful. see below (for stabs case). > Right. Generally, the name and version of the compiler is essential > information here. (The compiler used to build the test program, > not the compiler used to build gdb!) nick:{nick}42: cc --version cc (GCC) 3.2 (Mandrake Linux 9.0 3.2-1mdk) Copyright (C) 2002 Free Software Foundation, Inc. .file "basics.c" .file 1 "basics.c" .section .debug_abbrev,"",@progbits .Ldebug_abbrev0: .section .debug_info,"",@progbits .Ldebug_info0: .section .debug_line,"",@progbits .Ldebug_line0: .text .Ltext0: .align 2 .globl callee4 .type callee4,@function callee4: .LFB1: .loc 1 7 0 .LBB2: subl $12, %esp .LCFI0: .loc 1 8 0 movl $1, 8(%esp) .loc 1 9 0 movl $2, 4(%esp) .loc 1 12 0 movl 4(%esp), %eax addl 8(%esp), %eax movl %eax, (%esp) .loc 1 13 0 movl $0, %eax .LBE2: .loc 1 14 0 addl $12, %esp .LCFI1: ret .LFE1: .Lfe1: .size callee4,.Lfe1-callee4 .align 2 .globl callee3 .type callee3,@function callee3: .LFB2: .loc 1 16 0 pushl %ebp .LCFI2: movl %esp, %ebp .LCFI3: subl $8, %esp .LCFI4: .loc 1 17 0 call callee4 .loc 1 18 0 leave ret .LFE2: .Lfe2: .size callee3,.Lfe2-callee3 .align 2 .globl callee2 .type callee2,@function callee2: .LFB3: .loc 1 21 0 pushl %ebp .LCFI5: movl %esp, %ebp .LCFI6: subl $8, %esp .LCFI7: .loc 1 22 0 subl $12, %esp pushl 12(%ebp) .LCFI8: call callee3 addl $16, %esp .loc 1 23 0 leave ret .LFE3: .Lfe3: .size callee2,.Lfe3-callee2 .align 2 .globl callee1 .type callee1,@function callee1: .LFB4: .loc 1 26 0 pushl %ebp .LCFI9: movl %esp, %ebp .LCFI10: subl $8, %esp .LCFI11: movl 16(%ebp), %eax movl 20(%ebp), %edx movl %eax, -8(%ebp) movl %edx, -4(%ebp) .loc 1 27 0 subl $8, %esp pushl 12(%ebp) pushl 8(%ebp) .LCFI12: call callee2 addl $16, %esp .loc 1 28 0 leave ret .LFE4: .Lfe4: .size callee1,.Lfe4-callee1 .section .rodata .LC0: .string "A string argument." .LC1: .string "Hello, World!" .text .align 2 .globl main .type main,@function main: .LFB5: .loc 1 31 0 pushl %ebp .LCFI13: movl %esp, %ebp .LCFI14: subl $8, %esp .LCFI15: andl $-16, %esp movl $0, %eax subl %eax, %esp .loc 1 32 0 pushl $1074528256 pushl $0 pushl $.LC0 pushl $2 .LCFI16: call callee1 addl $16, %esp .loc 1 33 0 pushl $1074528256 pushl $0 pushl $.LC0 pushl $2 call callee1 addl $16, %esp .loc 1 35 0 subl $12, %esp pushl $.LC1 call printf addl $16, %esp .loc 1 37 0 movl $0, %eax .loc 1 38 0 leave ret .LFE5: .Lfe5: .size main,.Lfe5-main .section .debug_frame,"",@progbits .Lframe0: .long .LECIE0-.LSCIE0 .LSCIE0: .long 0xffffffff .byte 0x1 .string "" .uleb128 0x1 .sleb128 -4 .byte 0x8 .byte 0xc .uleb128 0x4 .uleb128 0x4 .byte 0x88 .uleb128 0x1 .align 4 .LECIE0: .LSFDE0: .long .LEFDE0-.LASFDE0 .LASFDE0: .long .Lframe0 .long .LFB1 .long .LFE1-.LFB1 .byte 0x4 .long .LCFI0-.LFB1 .byte 0xe .uleb128 0x10 .byte 0x4 .long .LCFI1-.LCFI0 .byte 0xe .uleb128 0x4 .align 4 .LEFDE0: .LSFDE2: .long .LEFDE2-.LASFDE2 .LASFDE2: .long .Lframe0 .long .LFB2 .long .LFE2-.LFB2 .byte 0x4 .long .LCFI2-.LFB2 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI3-.LCFI2 .byte 0xd .uleb128 0x5 .align 4 .LEFDE2: .LSFDE4: .long .LEFDE4-.LASFDE4 .LASFDE4: .long .Lframe0 .long .LFB3 .long .LFE3-.LFB3 .byte 0x4 .long .LCFI5-.LFB3 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI6-.LCFI5 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI8-.LCFI6 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE4: .LSFDE6: .long .LEFDE6-.LASFDE6 .LASFDE6: .long .Lframe0 .long .LFB4 .long .LFE4-.LFB4 .byte 0x4 .long .LCFI9-.LFB4 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI10-.LCFI9 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI12-.LCFI10 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE6: .LSFDE8: .long .LEFDE8-.LASFDE8 .LASFDE8: .long .Lframe0 .long .LFB5 .long .LFE5-.LFB5 .byte 0x4 .long .LCFI13-.LFB5 .byte 0xe .uleb128 0x8 .byte 0x85 .uleb128 0x2 .byte 0x4 .long .LCFI14-.LCFI13 .byte 0xd .uleb128 0x5 .byte 0x4 .long .LCFI16-.LCFI14 .byte 0x2e .uleb128 0x10 .align 4 .LEFDE8: .text .Letext0: .section .debug_info .long 0x13b .value 0x2 .long .Ldebug_abbrev0 .byte 0x4 .uleb128 0x1 .long .Ldebug_line0 .long .Letext0 .long .Ltext0 .long .LC11 .long .LC12 .long .LC13 .byte 0x1 .uleb128 0x2 .long 0x65 .byte 0x1 .long .LC2 .byte 0x1 .byte 0x7 .byte 0x1 .long 0x65 .long .LFB1 .long .LFE1 .byte 0x1 .byte 0x54 .uleb128 0x3 .string "A" .byte 0x1 .byte 0x8 .long 0x65 .byte 0x2 .byte 0x91 .sleb128 8 .uleb128 0x3 .string "B" .byte 0x1 .byte 0x9 .long 0x65 .byte 0x2 .byte 0x91 .sleb128 4 .uleb128 0x3 .string "C" .byte 0x1 .byte 0xa .long 0x65 .byte 0x2 .byte 0x91 .sleb128 0 .byte 0x0 .uleb128 0x4 .string "int" .byte 0x4 .byte 0x5 .uleb128 0x2 .long 0x96 .byte 0x1 .long .LC3 .byte 0x1 .byte 0x10 .byte 0x1 .long 0x65 .long .LFB2 .long .LFE2 .byte 0x1 .byte 0x55 .uleb128 0x5 .long .LC6 .byte 0x1 .byte 0xf .long 0x96 .byte 0x2 .byte 0x91 .sleb128 8 .byte 0x0 .uleb128 0x6 .byte 0x4 .long 0x9c .uleb128 0x7 .long .LC4 .byte 0x1 .byte 0x6 .uleb128 0x2 .long 0xdb .byte 0x1 .long .LC5 .byte 0x1 .byte 0x15 .byte 0x1 .long 0x65 .long .LFB3 .long .LFE3 .byte 0x1 .byte 0x55 .uleb128 0x5 .long .LC7 .byte 0x1 .byte 0x14 .long 0x65 .byte 0x2 .byte 0x91 .sleb128 8 .uleb128 0x5 .long .LC6 .byte 0x1 .byte 0x14 .long 0x96 .byte 0x2 .byte 0x91 .sleb128 12 .byte 0x0 .uleb128 0x2 .long 0x121 .byte 0x1 .long .LC8 .byte 0x1 .byte 0x1a .byte 0x1 .long 0x65 .long .LFB4 .long .LFE4 .byte 0x1 .byte 0x55 .uleb128 0x5 .long .LC7 .byte 0x1 .byte 0x19 .long 0x65 .byte 0x2 .byte 0x91 .sleb128 8 .uleb128 0x5 .long .LC6 .byte 0x1 .byte 0x19 .long 0x96 .byte 0x2 .byte 0x91 .sleb128 12 .uleb128 0x5 .long .LC9 .byte 0x1 .byte 0x19 .long 0x121 .byte 0x2 .byte 0x91 .sleb128 -8 .byte 0x0 .uleb128 0x7 .long .LC10 .byte 0x8 .byte 0x4 .uleb128 0x8 .byte 0x1 .long .LC14 .byte 0x1 .byte 0x1f .long 0x65 .long .LFB5 .long .LFE5 .byte 0x1 .byte 0x55 .byte 0x0 .section .debug_abbrev .uleb128 0x1 .uleb128 0x11 .byte 0x1 .uleb128 0x10 .uleb128 0x6 .uleb128 0x12 .uleb128 0x1 .uleb128 0x11 .uleb128 0x1 .uleb128 0x3 .uleb128 0xe .uleb128 0x1b .uleb128 0xe .uleb128 0x25 .uleb128 0xe .uleb128 0x13 .uleb128 0xb .byte 0x0 .byte 0x0 .uleb128 0x2 .uleb128 0x2e .byte 0x1 .uleb128 0x1 .uleb128 0x13 .uleb128 0x3f .uleb128 0xc .uleb128 0x3 .uleb128 0xe .uleb128 0x3a .uleb128 0xb .uleb128 0x3b .uleb128 0xb .uleb128 0x27 .uleb128 0xc .uleb128 0x49 .uleb128 0x13 .uleb128 0x11 .uleb128 0x1 .uleb128 0x12 .uleb128 0x1 .uleb128 0x40 .uleb128 0xa .byte 0x0 .byte 0x0 .uleb128 0x3 .uleb128 0x34 .byte 0x0 .uleb128 0x3 .uleb128 0x8 .uleb128 0x3a .uleb128 0xb .uleb128 0x3b .uleb128 0xb .uleb128 0x49 .uleb128 0x13 .uleb128 0x2 .uleb128 0xa .byte 0x0 .byte 0x0 .uleb128 0x4 .uleb128 0x24 .byte 0x0 .uleb128 0x3 .uleb128 0x8 .uleb128 0xb .uleb128 0xb .uleb128 0x3e .uleb128 0xb .byte 0x0 .byte 0x0 .uleb128 0x5 .uleb128 0x5 .byte 0x0 .uleb128 0x3 .uleb128 0xe .uleb128 0x3a .uleb128 0xb .uleb128 0x3b .uleb128 0xb .uleb128 0x49 .uleb128 0x13 .uleb128 0x2 .uleb128 0xa .byte 0x0 .byte 0x0 .uleb128 0x6 .uleb128 0xf .byte 0x0 .uleb128 0xb .uleb128 0xb .uleb128 0x49 .uleb128 0x13 .byte 0x0 .byte 0x0 .uleb128 0x7 .uleb128 0x24 .byte 0x0 .uleb128 0x3 .uleb128 0xe .uleb128 0xb .uleb128 0xb .uleb128 0x3e .uleb128 0xb .byte 0x0 .byte 0x0 .uleb128 0x8 .uleb128 0x2e .byte 0x0 .uleb128 0x3f .uleb128 0xc .uleb128 0x3 .uleb128 0xe .uleb128 0x3a .uleb128 0xb .uleb128 0x3b .uleb128 0xb .uleb128 0x49 .uleb128 0x13 .uleb128 0x11 .uleb128 0x1 .uleb128 0x12 .uleb128 0x1 .uleb128 0x40 .uleb128 0xa .byte 0x0 .byte 0x0 .byte 0x0 .section .debug_pubnames,"",@progbits .long 0x47 .value 0x2 .long .Ldebug_info0 .long 0x13f .long 0x25 .string "callee4" .long 0x6c .string "callee3" .long 0xa3 .string "callee2" .long 0xdb .string "callee1" .long 0x128 .string "main" .long 0x0 .section .debug_aranges,"",@progbits .long 0x1c .value 0x2 .long .Ldebug_info0 .byte 0x4 .byte 0x0 .value 0x0 .value 0x0 .long .Ltext0 .long .Letext0-.Ltext0 .long 0x0 .long 0x0 .section .debug_str,"MS",@progbits,1 .LC13: .string "GNU C 3.2 (Mandrake Linux 9.0 3.2-1mdk)" .LC12: .string "/home/nick" .LC7: .string "intarg" .LC6: .string "strarg" .LC8: .string "callee1" .LC5: .string "callee2" .LC3: .string "callee3" .LC2: .string "callee4" .LC11: .string "basics.c" .LC14: .string "main" .LC4: .string "char" .LC9: .string "fltarg" .LC10: .string "double" .ident "GCC: (GNU) 3.2 (Mandrake Linux 9.0 3.2-1mdk)"