From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18513 invoked by alias); 2 Jan 2005 07:12:03 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18448 invoked from network); 2 Jan 2005 07:11:55 -0000 Received: from unknown (HELO mail.netspace.net.au) (203.10.110.76) by sourceware.org with SMTP; 2 Jan 2005 07:11:55 -0000 Received: from [192.168.1.11] (220-253-35-78.VIC.netspace.net.au [220.253.35.78]) by mail.netspace.net.au (Postfix) with ESMTP id 17FDE10C027 for ; Sun, 2 Jan 2005 18:11:53 +1100 (EST) Message-ID: <41D79FB0.4080902@netspace.net.au> Date: Sun, 02 Jan 2005 07:12:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 MIME-Version: 1.0 Cc: gdb@sources.redhat.com Subject: Re: exec References: <41D76E37.8050400@netspace.net.au> <20050102034735.GA6823@nevyn.them.org> In-Reply-To: <20050102034735.GA6823@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00005.txt.bz2 Daniel Jacobowitz wrote: > On Sun, Jan 02, 2005 at 02:44:55PM +1100, Russell Shaw wrote: > >>Hi, >>When i step into: >> >> (*func) (program, argv); >> >>gdb exits. >> >>func is execv, and program is "/usr/local/libexec/gcc/avr/3.4.3/cc1" >> >>How do i get into cc1 so i can set breakpoints there? > > Run it by hand - gcc -v will show you the command line. GDB has very > limited support for debugging across exec, depending on your platform. Hi, Cc1 runs ok at the command line: /usr/local/libexec/gcc/avr/3.4.3/cc1 -quiet -v main.c -quiet -dumpbase main.c -dP -mmcu=atmega16 -auxbase main -g -O0 -Wall -Wno-unused -version -o /tmp/cccVrfqY.s When i try to run the same thing in gdb, it crashes: Program received signal SIGSEGV, Segmentation fault. 0x080f3cd1 in init_emit () at ../../gcc-3.4.3/gcc/emit-rtl.c:5354 /home/russell/SRC/gcc-3.4.3/gcc/emit-rtl.c:5354:138102:beg:0x80f3cd1 (gdb) It crashes in emit-rtl.c here: /* Indicate that the virtual registers and stack locations are all pointers. */ REG_POINTER (stack_pointer_rtx) = 1;