Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [apple scitech] leopard gdb problem



Seems to work fine for me on leopard.

haven:test jon$ uname -a
Darwin haven 9.1.0 Darwin Kernel Version 9.1.0: Wed Oct 31 17:46:22
PDT 2007; root:xnu-1228.0.2~1/RELEASE_I386 i386
haven:test jon$ cat test.c
#include <stdio.h>
main(){printf("hw\n");}
haven:test jon$ cc -o test test.c
haven:test jon$ gdb test
...snip...
(gdb) break main
Breakpoint 1 at 0x1fde
(gdb) r
Starting program: /Users/jon/test/test
Reading symbols for shared libraries ++. done
Breakpoint 1, 0x00001fde in main ()
(gdb) c
Continuing.
hw
Program exited with code 012.
(gdb)

Perhaps you have ptrace() called with PT_DENY_ATTACH? This could
simulate the behavior you're currently experiencing.

-Jon Bringhurst <email@hidden>

On Nov 27, 2007 4:40 PM, Dave Chen <email@hidden> wrote:
>
>
>
>
> When I try to run my command-line programs in gdb all it does is print
> "darwin-i386" and then exit normally.  It never actually runs the program.
>
> Here's an example:
>
>
> puget => gdb fillHoles
> GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC
> 2007)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-apple-darwin"...Reading symbols for shared
> libraries ....... done
>
> (gdb) b main
> Breakpoint 1 at 0x100004b5f: file
> /nfs/mead/Users/dave/dsrc/geom/fillHoles.C, line 527.
> (gdb) r
> darwin-i386
>
> Program exited normally.
>
>
> It never even stops at the breakpoint I put at main.
>
> Anyone have any idea what is going on or seen anything similar?  If I run
> the program without gdb, I can attach to the process OK, but I just can't
> start programs in gdb.
>
> Thanks,
> Dave
>
>
> David T. Chen, PhD                      [Lockheed Martin contractor]
> mailto:email@hidden               http://erie.nlm.nih.gov/~dave
> phone:301.435.3264                      iphone:301.524.3174
> Office of High Performance Computing and Communications
> National Library of Medicine
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Scitech mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/scitech/email@hidden
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/scitech/email@hidden

This email sent to email@hidden

References: 
 >[apple scitech] leopard gdb problem (From: Dave Chen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.