• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compile acts differently when run from terminal and in debugger???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile acts differently when run from terminal and in debugger???


  • Subject: Re: Compile acts differently when run from terminal and in debugger???
  • From: "Theodore H. Smith" <email@hidden>
  • Date: Fri, 9 Feb 2007 23:52:52 +0000


On 9 Feb 2007, at 22:39, Chris Espinosa wrote:


On Feb 9, 2007, at 2:28 PM, Theodore H. Smith wrote:

No that's not it.

It reads one file only, and writes none. If it can't read the file, the app exits very early, it outputs about 3 lines of text before quitting.

If it can find the input file, it outputs hundreds of lines.

I can tell the difference.

The current directory has no effect on my code other than does it get the input file or not. And it's always getting the same input file.

It's like something is different causing some data structures to be written into RAM differently. Or maybe the malloc is differently linked and I'm getting some special version of malloc which is zeroing memory but only within Xcode or something like that.

Basically it's the abstract data structures that are being different, it's not IO or library stuff that's different. My app is heavily abstract data oriented, barely does any IO. (Well barely any input anyhow, lots of output. This is because it's a testing app, so it thoroughly tests the app with about 100 variations per input).

Do you have Zero Link enabled?

Can you launch the tool under gdb from the command line and step through it and see what's happening?

%  gdb /Users/theodore/Programming/ElfData/Source/build/debug/ewasd
<spew>
gdb) b main
Breakpoint 1 set at main()
gdb) run

Indeed I can run gdb. Zero Link is disabled though, why?

Well thanks for pointing me to a cool new tool. Now all I gotta do is learn gdb ;) I'm sure man will be helpful, or else I'll find some more stone-age method, like printf. Simple tools often work well due to their sheer simplicity.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Compile acts differently when run from terminal and in debugger???
      • From: Jonas Maebe <email@hidden>
References: 
 >Compile acts differently when run from terminal and in debugger??? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Compile acts differently when run from terminal and in debugger??? (From: Chris Espinosa <email@hidden>)
 >Re: Compile acts differently when run from terminal and in debugger??? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Compile acts differently when run from terminal and in debugger??? (From: Chris Espinosa <email@hidden>)

  • Prev by Date: [Q] Jar and Xcode
  • Next by Date: Re: Using fstream
  • Previous by thread: Re: Compile acts differently when run from terminal and in debugger???
  • Next by thread: Re: Compile acts differently when run from terminal and in debugger???
  • Index(es):
    • Date
    • Thread