Emulation and simulation of
Wireless Sensor Networks


   Project Page






 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/debug/sigsegv.c File Reference

#include <memory.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <ucontext.h>
#include <dlfcn.h>
#include <execinfo.h>

Go to the source code of this file.


#define _GNU_SOURCE
#define REGFORMAT   "%x"


int setup_sigsegv ()

Define Documentation

#define _GNU_SOURCE

Definition at line 18 of file sigsegv.c.


This source file is used to print out a stack-trace when your program segfaults. It is relatively reliable and spot-on accurate.

This code is in the public domain. Use it as you see fit, some credit would be appreciated, but is not a prerequisite for usage. Feedback on it's use would encourage further development and maintenance.

Author: Jaco Kroon <jaco@kroon.co.za>

Copyright (C) 2005 - 2006 Jaco Kroon

Definition at line 15 of file sigsegv.c.

#define REGFORMAT   "%x"

Definition at line 38 of file sigsegv.c.


Definition at line 37 of file sigsegv.c.

Function Documentation

int setup_sigsegv  ) 

Definition at line 123 of file sigsegv.c.

Referenced by main().

© 2007, Los Alamos National Security, LLC.