This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb can not debug âhello worldâ in mac os x


Apple Leopard's gdb does not produce this error. But I want to use Eclipse
CDT, and it can not work with Apple's gdb, that is why I am trying to use a
non-Apple gdb version. 


Peter Watkins-6 wrote:
> 
> Hi Horacio,
> 
> 
> On 03/08/2011 07:54 AM, horacio.sanchez@kit.edu wrote:
>>
>> Hi, I have the following smal C++ program
>>
>> #include<stdio.h>
>> #include<stdlib.h>
>>
>> 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
> 
> 

-- 
View this message in context: http://old.nabble.com/gdb-can-not-debug-%E2%80%9Chello-world%E2%80%9D-in-mac-os-x-tp31098392p31098906.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]