M
mdh
I am working on 5.11 ( once again).
So, just stepping through code in the debugger, and get this...and
cannot proceed. Have posted to the Xcode forum, but my guess is the
real gurus are here in C!! Not sure if this is a strict "C" issue,
but I am sure you will let me know !!
The code is simply this, with 2 command line arguments:
#include <stdio.h>
int astrcomp(const char *, const char *);
int main (int argc, const char * argv[]) {
int i;
i = astrcomp(argv[1], argv[2]);
if ( i == 0)
printf(" \"%s\" equals \"%s\" ", argv[1], argv[2] );
else if ( i > 0 )
printf(" \"%s\" is greater than \"%s\" ", argv[1], argv[2] );
else if ( i < 0 )
printf(" \"%s\" is less than \"%s\" ", argv[1], argv[2] );
return 0;
}
int astrcomp(const char *s, const char *t){
for (; *s == *t ; s++, t++)
if ( *s == 0)
return 0;
return (*s - *t);
}
Pending breakpoint 1 - ""main.c:3" resolved
gdb stack crawl at point of internal error:
[ 0 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (align_down
+0x0) [0x11d2ff]
[ 1 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(step_into_current_inlined_subroutine+0x109) [0x6d5b2]
[ 2 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(inlined_function_update_call_stack+0x154a) [0x6ebbe]
[ 3 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(handle_inferior_event+0xbfe) [0x68332]
[ 4 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(fetch_inferior_event+0x125) [0x6abda]
[ 5 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(inferior_event_handler+0xd0) [0x7e9c4]
[ 6 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(handle_file_event+0x159) [0x7c8ac]
[ 7 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (process_event
+0x81) [0x7c49e]
[ 8 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(gdb_do_one_event+0x46a) [0x7d33c]
[ 9 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_errors
+0x4d) [0x77487]
[ 10 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(start_event_loop+0x52) [0x7c4fd]
[ 11 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(captured_command_loop+0x12) [0x7821e]
[ 12 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_errors
+0x4d) [0x77487]
/SourceCache/gdb/gdb-768/src/gdb/inlining.c:1742: internal-error:
step_into_current_inlined_subroutine: Assertion
`current_inlined_subroutine_call_stack_start_pc() == stop_pc' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
The Debugger has exited with status 1.The Debugger has exited with
status 1.
Any insight is, as always , appreciated.
So, just stepping through code in the debugger, and get this...and
cannot proceed. Have posted to the Xcode forum, but my guess is the
real gurus are here in C!! Not sure if this is a strict "C" issue,
but I am sure you will let me know !!
The code is simply this, with 2 command line arguments:
#include <stdio.h>
int astrcomp(const char *, const char *);
int main (int argc, const char * argv[]) {
int i;
i = astrcomp(argv[1], argv[2]);
if ( i == 0)
printf(" \"%s\" equals \"%s\" ", argv[1], argv[2] );
else if ( i > 0 )
printf(" \"%s\" is greater than \"%s\" ", argv[1], argv[2] );
else if ( i < 0 )
printf(" \"%s\" is less than \"%s\" ", argv[1], argv[2] );
return 0;
}
int astrcomp(const char *s, const char *t){
for (; *s == *t ; s++, t++)
if ( *s == 0)
return 0;
return (*s - *t);
}
Pending breakpoint 1 - ""main.c:3" resolved
gdb stack crawl at point of internal error:
[ 0 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (align_down
+0x0) [0x11d2ff]
[ 1 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(step_into_current_inlined_subroutine+0x109) [0x6d5b2]
[ 2 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(inlined_function_update_call_stack+0x154a) [0x6ebbe]
[ 3 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(handle_inferior_event+0xbfe) [0x68332]
[ 4 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(fetch_inferior_event+0x125) [0x6abda]
[ 5 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(inferior_event_handler+0xd0) [0x7e9c4]
[ 6 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(handle_file_event+0x159) [0x7c8ac]
[ 7 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (process_event
+0x81) [0x7c49e]
[ 8 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(gdb_do_one_event+0x46a) [0x7d33c]
[ 9 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_errors
+0x4d) [0x77487]
[ 10 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(start_event_loop+0x52) [0x7c4fd]
[ 11 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin
(captured_command_loop+0x12) [0x7821e]
[ 12 ] /Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_errors
+0x4d) [0x77487]
/SourceCache/gdb/gdb-768/src/gdb/inlining.c:1742: internal-error:
step_into_current_inlined_subroutine: Assertion
`current_inlined_subroutine_call_stack_start_pc() == stop_pc' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
The Debugger has exited with status 1.The Debugger has exited with
status 1.
Any insight is, as always , appreciated.