From: adwyer AT galaxy DOT csc DOT calpoly DOT edu (Aaron Dwyer) Newsgroups: comp.os.msdos.djgpp Subject: GDB debugging Date: Sun, 24 Nov 1996 11:07:35 GMT Organization: Cal Poly, San Luis Obispo Lines: 21 Message-ID: <579aaf$l6k@isnews.csc.calpoly.edu> NNTP-Posting-Host: p102-13-w.palomar.reshall.calpoly.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm currently finishing up an implementation of quicksort in DJGPP to sort polygons far to near, classic painter's algo situation...BUT...my quicksort doesn't seem to agree with the type of data structures I'm using or something. Anyways, GDB is telling me that it crashes somewhere deep into the recursion on the line which calls quicksort recursively to process the left-hand partition of the array being sorted. The line reads: quicksort(lo, thi); What kinds of clues regarding my bug can I get from knowing the program crashes on a function calling line? It can't be stack overflow because I'm only sorting 100 values in this test case...0-99 values works perfectly, but 100+ values will cause a crash :I I guess this question concerns what I can learn from GDB more than anything, because my quicksort will work for sorting a plain old integer array, in fact I can sort a 10000 value array just fine, but when I try to sort a list of polygons it will only do 0 - 99 before it seg faults on that line as mentioned above. Comments, questions, truly anything you have to tell me will help =) Thanks, Aaron Dwyer