• 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 01:33:41 +0000

Oh, I'm using Xcode 2.4.1 and gcc 4.0.1 I think.

On 9 Feb 2007, at 01:30, Theodore H. Smith wrote:

I'm compiling some small shell tool.

It doesn't use any library functions except fopen (and fread and fclose), and malloc and free.

However, I'm seeing some really odd thing. The tool runs differently when run from the terminal and when debugged inside Xcode!

What's worse, it's causing a bug that only shows up in the terminal.

It's the same file. I'm not talking about release vs debug build, but the debug build actually run from the terminal. So I do this:

rexaf-t3% /Users/theodore/Programming/ElfData/Source/build/debug/ewasd

And it fails in the terminal. If it were the other way around, I'd be fine :( That's what the debugger is therefor, to catch ALL the bugs you'd get in a release build, if not more. Unfortunately it's missing some.

I have no idea why. I can't explain it.

I'm not passing any parameters.

Any ideas anyone?

Would it help if I pasted my debug build config settings?

ARCHS = i386
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_DEBUGGING_SYMBOLS = full
GCC_ENABLE_SYMBOL_SEPARATION = YES
GCC_OPTIMIZATION_LEVEL = 0
GCC_NO_COMMON_BLOCKS = NO
GCC_REUSE_STRINGS = YES
GCC_DYNAMIC_NO_PIC = NO
GCC_FAST_OBJC_DISPATCH = NO
GCC_ENABLE_OBJC_GC = NO
GCC_UNROLL_LOOPS = NO
GCC_FAST_MATH = NO
GCC_STRICT_ALIASING = NO
GCC_MODEL_TUNING =
GCC_MODEL_PPC64 = NO
GCC_AUTO_VECTORIZATION = NO
GCC_ENABLE_SSE3_EXTENSIONS = NO
GCC_FEEDBACK_DIRECTED_OPTIMIZATION = Off
GCC_SYMBOLS_PRIVATE_EXTERN = NO
GCC_INLINES_ARE_PRIVATE_EXTERN = NO
GCC_ENABLE_FIX_AND_CONTINUE = NO
GCC_OBJC_CALL_CXX_CDTORS = NO
GCC_THREADSAFE_STATICS = YES
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
GCC_GENERATE_TEST_COVERAGE_FILES = NO


Seems like I'll have to resort to stone-age debugging skills :(

printf :) haha. What a shame. Also a shame because my app is a shell tool and it's not really very configurable, and it procseses so much data, that when I start printffing stuff, it prints a few MB of text sometimes before it actually prints anything that could be error related. OK I did trim it down to a few KB but even then I'm not liking sorting through all the output just for the bit I need.


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


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Compile acts differently when run from terminal and in debugger??? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Compile acts differently when run from terminal and in debugger???
  • Next by Date: Error on overloading IOStream operators in C++
  • Previous by thread: 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