Re: FreeBSD/Alpha Debugging Help Needed

From: Date: Thu, 31 Oct 2002 20:49:53 +0000
Subject: Re: FreeBSD/Alpha Debugging Help Needed
References: 1 2 3 4  Groups: php.qa 
Request: Send a blank email to php-qa+get-6519@lists.php.net to get a copy of this message
At 21:08 31-10-2002, Bunny wrote:
It may be the combination (which would suggest a bug in ini-handling). Try: set environment TEST_EXECUTABLE=sapi/cli/php set args -f run-tests.php ext/mbstring/tests/htmlent.phpt Rebuilt with -fno-omit-frame-pointer. I'm still getting a core with nothing usable... Core was generated by `php'. Program terminated with signal 8, Floating point exception. warning: Hit heuristic-fence-post without finding warning: enclosing function for address 0x160277394 This warning occurs if you are debugging a function without any symbols (for example, in a stripped executable). In that case, you may wish to increase the size of the search with the `set heuristic-fence-post' command.
Well - just try heuristic fence thingy :) Never used that.
Otherwise, you told GDB there was a function where there isn't one, or (more likely) you have encountered a bug in GDB. #0 0x160277394 in ?? () (gdb) bt #0 0x160277394 in ?? () warning: Hit heuristic-fence-post without finding warning: enclosing function for address 0x160270078 (Different test this time.) I still can't get it to die inside of gdb. Question - I'm getting a core file when I run the test like this from within gdb, but gdb never stops me. Is that because it forks to run the test, and it's out of the scope for gdb?
Yep. run-tests.php forks the testfile. Try this option in gdb: set follow-fork-mode
If you've done so, the bug is in libc, and you should recompile the kernel with DEBUG options. Take a look at the LINT kernel in /sys/conf/$ARCH/. That'll take some time. Building a kernel on this machine takes over an hour. =) But I'm wiling to try.
Reading up, I think rebuilding the kernel is just 1 step :( So - it depends on what you want to use this machine for. You need to do a make world, or at least recompile libc and gdb. Unless you know what you are doing, make world is the best thing to do. See /etc/make.conf on how to set up debugging. If you want to use the machine for debugging FreeBSD 64-bit arch (which is a very welcome addition to PHP-QA by the way), then this will help. Building a debug kernel will help with even more, into the syscall() functions for one, driver issues and stuff like that. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua

« previous php.qa (#6519) next »