• 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
A problem internal to GDB has been detected, further debugging may prove unreliable.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A problem internal to GDB has been detected, further debugging may prove unreliable.


  • Subject: A problem internal to GDB has been detected, further debugging may prove unreliable.
  • From: Michael <email@hidden>
  • Date: Sun, 18 Nov 2007 12:37:50 -0800

I wonder if anyone could enlighten me.  Using the "Standard Tool" and this code ( I'm learning)

#include <stdio.h>

int astrcmp(const char *, const char *);

int main (int argc, const char * argv[]) {
  int i;
  i = astrcmp(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 astrcmp(const char *s, const char *t){
  for (; *s == *t; s++, t++){
if ( *s == 0)
  return 0;
  }
  return ((*s - *t) > (*t - *s));
}

stepping through the code, it soon exits and gives the following on the console. I know there is an error in the code, but cannot get to it until I can step through it.

Thank you in advance.


Running…
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.

 _______________________________________________
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

  • Prev by Date: Re: Link warning > 2000 and stop build
  • Next by Date: Re: Link warning > 2000 and stop build
  • Previous by thread: Re: Disable "poof" effect when removing breakpoints
  • Next by thread: /usr/bin/make gone?
  • Index(es):
    • Date
    • Thread