This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
We have a (large) program that causes gdb to SEGV. It dies in the partial-stab code because it dereferences a null pst pointer. The patch below gets around the two cases that die on our example, but I don't know if it's actually a good patch. There might be a more appropriate place to handle the null pst condition. *** partial-stab.h.orig Thu Oct 29 19:38:09 1998 --- partial-stab.h Tue Nov 3 08:11:12 1998 *************** *** 397,402 **** --- 397,403 ---- function relative stabs, or the address of the function's end for old style stabs. */ valu = CUR_SYMBOL_VALUE + last_function_start; + if (pst) if (pst->texthigh == 0 || valu > pst->texthigh) pst->texthigh = valu; break; *************** *** 591,597 **** use the address of this function as the low bound for the partial symbol table. */ if (textlow_not_set ! || (CUR_SYMBOL_VALUE < pst->textlow && CUR_SYMBOL_VALUE != ANOFFSET (section_offsets, SECT_OFF_TEXT))) { --- 592,598 ---- use the address of this function as the low bound for the partial symbol table. */ if (textlow_not_set ! || ( ( pst && (CUR_SYMBOL_VALUE < pst->textlow) ) && CUR_SYMBOL_VALUE != ANOFFSET (section_offsets, SECT_OFF_TEXT))) {