This is the mail archive of the insight@sourceware.org mailing list for the Insight 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: Insight 6.4 GUI does not start on Mac OS X


Hello Keith,

It's not the startup code on OS X that is giving me trouble. I reckon that a memcpy() in xstrdup() fails. I did some single stepping and this is how it looks like:

[snip] (we're in gdb's captured_main() now)

241 interpreter_p = xstrdup (context->interpreter_p);
---xstrdup (s=0x315af0 "insight") at ../../insight-6.4/libiberty/ xstrdup.c:33
33 register size_t len = strlen (s) + 1;
34 register char *ret = XNEWVEC (char, len);
---xmalloc (size=8) at ../../insight-6.4/gdb/utils.c:973
973 if (size == 0)
976 val = malloc (size); /* OK: malloc */
977 if (val == NULL)
981 }
---xstrdup (s=0x315af0 "insight") at ../../insight-6.4/libiberty/ xstrdup.c:36
36 }
---xstrdup (s=0x315af0 "insight") at ../../insight-6.4/libiberty/ xstrdup.c:35
35 return (char *) memcpy (ret, s, len);
36 }
35 return (char *) memcpy (ret, s, len);
---exceptions_state_mc_action_iter () at ../../insight-6.4/gdb/ exceptions.c:203
203 return exceptions_state_mc (CATCH_ITER);
---exceptions_state_mc (action=CATCH_ITER) at ../../insight-6.4/gdb/ exceptions.c:126
126 switch (current_catcher->state)
173 switch (action)
177 struct gdb_exception exception = *current_catcher->exception;
178 if (current_catcher->mask & RETURN_MASK (exception.reason))
177 struct gdb_exception exception = *current_catcher->exception;
178 if (current_catcher->mask & RETURN_MASK (exception.reason))
183 catcher_pop ();
---catcher_pop () at ../../insight-6.4/gdb/exceptions.c:107
107 struct catcher *old_catcher = current_catcher;
108 current_catcher = old_catcher->prev;
113 restore_cleanups (old_catcher->saved_cleanup_chain);
---restore_cleanups (chain=0x0) at ../../insight-6.4/gdb/utils.c:416
416 restore_my_cleanups (&cleanup_chain, chain);
---restore_my_cleanups (pmy_chain=0x3edbd8, chain=0x0) at ../../ insight-6.4/gdb/utils.c:428
428 *pmy_chain = chain;
429 }
---catcher_pop () at ../../insight-6.4/gdb/exceptions.c:115
115 uiout = old_catcher->saved_uiout;
118 }
---catcher_pop () at ../../insight-6.4/gdb/exceptions.c:115
115 uiout = old_catcher->saved_uiout;
117 xfree (old_catcher);
115 uiout = old_catcher->saved_uiout;
118 }
117 xfree (old_catcher);
---xfree (ptr=0x2804600) at ../../insight-6.4/gdb/utils.c:1032
1032 if (ptr != NULL)
1033 free (ptr); /* OK: free */


Program exited with code 01

The program exits within the first 400 instructions after captured_main() has been called. This stuff might be more related to the gdb folks. Do you have any quick pointer at the moment?

Cheers,
Hermann

Ouch. You're not even in insight's code yet. I hope you have the source available. ;-)

God bless www.opensource.apple.com!


Yeah, you just hit a wall with me: I'm afraid I probably won't be much help from here on out, but I'm willing to help any way I can if you keep the list updated with your efforts.

Line 272 of crt.c just equals exit(main(argc, argv, envp, apple));


But main() does not appear on the stack frame.

I quote: "_start() is called from the machine dependent assembly entry point "start:" . It takes care of setting up the stack so 'C' routines can be called and
passes argc, argv and envp to here."


This is no particularly sophisticated code. So I am surprised that it fails. What I am going to do now is to single step this baby and see what exactly is going wrong there.

Cheers,
Hermann



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