From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9521 invoked by alias); 17 Mar 2002 06:28:13 -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 9482 invoked from network); 17 Mar 2002 06:28:12 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 17 Mar 2002 06:28:12 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id EF65C5E9DE; Sun, 17 Mar 2002 01:28:10 -0500 (EST) From: Jim Blandy To: gdb-patches@sources.redhat.com Cc: gcc@gcc.gnu.org Subject: Test file for GDB preprocessor macro support Message-Id: <20020317062810.EF65C5E9DE@zwingli.cygnus.com> Date: Sat, 16 Mar 2002 22:28:00 -0000 X-SW-Source: 2002-03/txt/msg00272.txt.bz2 Since GCC doesn't emit Dwarf 2 macro information, you have to edit it into the assembly file by hand. Compile the following source file with "gcc -gdwarf-2 -dA -S test.c": ---- #include #include void foo () { printf ("Nice to meet you!\n"); } int main (int argc, char **argv) { printf ("Hello, world!\n"); foo (); return 0; } --- Now, add the following to the end of test.s: .section .debug_macinfo .byte 3 # DW_MACINFO_start_file .byte 0 # line number .byte 1 # file 1: test.c .byte 1 # DW_MACINFO_define .byte 2 # line 2 .ascii "FOO 12<\0" .byte 1 # DW_MACINFO_define .byte 3 # line 3 .ascii "BAR(arg1,arg2) (arg1