Bugzilla – Bug 894
./waf --run error message upon segfault
Last modified: 2010-04-23 10:55:46 UTC
The typical output of ./waf --run when a segfault happens is this: Command ['/home/muhr/Documents/cplus-ns3-workspace/MIMO_MESH_204/build/ debug/scratch/MIMO_MESH/MIMO_MESH'] exited with code -11 Could we make waf print something different such as: "Your program crashed: run it under a debugger to get more information. For example, with gdb, type \"./waf --command-template="gdb %s" --run YOURPROGRAM\"" Where YOURPROGRAM would be the argument the user specified to --run
Created attachment 845 [details] Patch Attaching a patch. Here's what a segmentation fault now shows up as: nightstrike@irule:~/builds/ns3/new/ns-3-final$ ./waf --run "scratch/xyz --assocMethod1=1" Waf: Entering directory `/home/nightstrike/builds/ns3/new/ns-3-final/build' '/home/nightstrike/builds/ns3/new/ns-3-final/bindings/python/ns3/__init__.py' -> '/home/nightstrike/builds/ns3/new/ns-3-final/build/debug/bindings/python/ns3/__init__.py' Waf: Leaving directory `/home/nightstrike/builds/ns3/new/ns-3-final/build' 'build' finished successfully (0.789s) Your program crashed with exit code -11 (Segmentation fault). Run it under a debugger to get more information. For example, with gdb, type: ./waf --command-template="gdb %s" --run "scratch/xyz --assocMethod1=1"
gustavo, ok with you ? josh, can we push this in the release ?
Created attachment 846 [details] patch This version of the patch works with any signal, not just sigsegv.
(In reply to comment #3) > Created an attachment (id=846) [details] > patch > > This version of the patch works with any signal, not just sigsegv. +1, support this for ns-3.8.
changeset: 6275:77f833c7ddae tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Fri Apr 23 15:55:15 2010 +0100 summary: Bug 894 - ./waf --run error message upon segfault