On Mon, 18 Jan 1999, Angus Mezick wrote: >you missed the point of the message that I sent, the backtrace >will not show the level at which the mud crashed, just the function >that called the function that crashed and the signal handler that >catches the crash. the REALLY important data is missing. :( I was thinking: /* special in room? */ if (GET_ROOM_SPEC(ch->in_room) != NULL) if (GET_ROOM_SPEC(ch->in_room) (ch, world + ch->in_room, cmd, arg)) return 1; log("not room"); /* special in equipment list? */ for (j = 0; j < NUM_WEARS; j++) if (GET_EQ(ch, j) && GET_OBJ_SPEC(GET_EQ(ch, j)) != NULL) if (GET_OBJ_SPEC(GET_EQ(ch, j)) (ch, GET_EQ(ch, j), cmd, arg)) return 1; log("not equip"); etc. Another cute thing to do is use this as your signal 11 handler: void sigsegv(int x) { fprintf(stderr, "%ld:%d: ", pthread_self(), x); fprintf(stderr, "<%p> ", __builtin_return_address(0)); fprintf(stderr, "<%p> ", __builtin_return_address(1)); fprintf(stderr, "<%p> ", __builtin_return_address(2)); fprintf(stderr, "<%p> ", __builtin_return_address(3)); fprintf(stderr, "<%p>\n", __builtin_return_address(4)); signal(SIGSEGV, SIG_DFL); raise(SIGSEGV); } It may work better... may not. Probably want to remove the pthread_self() call up there unless you're threaded. (And the argument _must_ be a constant above.) -- George Greer greerga@circlemud.org http://www.circlemud.org/~greerga/ +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST