From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2415 invoked by alias); 8 Mar 2011 16:29:30 -0000 Received: (qmail 2407 invoked by uid 22791); 8 Mar 2011 16:29:29 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,TW_GX X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 16:29:25 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Pwzml-0001qw-VB from Peter_Watkins@mentor.com for gdb@sourceware.org; Tue, 08 Mar 2011 08:29:23 -0800 Received: from na3-mail.mgc.mentorg.com ([147.34.99.66]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 8 Mar 2011 08:29:23 -0800 Received: from [147.34.41.113] ([147.34.41.113]) by na3-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Mar 2011 08:29:23 -0800 Message-ID: <4D765964.2090804@mentor.com> Date: Tue, 08 Mar 2011 16:29:00 -0000 From: Peter Watkins User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: gdb can not debug =?windows-1252?Q?=93hello_world=94_in_?= =?windows-1252?Q?mac_os_x?= References: <1299599657.19674.ezmlm@sourceware.org> In-Reply-To: <1299599657.19674.ezmlm@sourceware.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00055.txt.bz2 Hi Horacio, On 03/08/2011 07:54 AM, horacio.sanchez@kit.edu wrote: > > Hi, I have the following smal C++ program > > #include > #include > > int main(void) { > puts("!!!Hello World!!!"); > return EXIT_SUCCESS; > } > > I compile in Mac OS X Leopard last release using: > > g++ -g hello.cpp -o hello.exe > > being g++: > > host:bin macbook$ g++ --ver > Using built-in specs. > Target: i686-apple-darwin9 > Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking > -enable-werror --prefix=/usr --mandir=/share/man > --enable-languages=c,objc,c++,obj-c++ > --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ > --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib > --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic > --host=i686-apple-darwin9 --target=i686-apple-darwin9 > Thread model: posix > gcc version 4.0.1 (Apple Inc. build 5493) Did you get your GCC version from the Apple Developer Tools? > then I try to debug this program using fsf-gdb 7.1: > > fsf-gdb hello.exe What happens when you use Apple's version of GDB that comes with the Developer Tools? -Peter