From 9eb8eb3c8a1b291da7359a9fc1f1c749272a1f28 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Mon, 2 Feb 2009 14:17:15 +0100 Subject: Initial git commit --- src/Hooks/CCpp.cpp | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/Hooks/CCpp.cpp (limited to 'src/Hooks/CCpp.cpp') diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp new file mode 100644 index 0000000..79156d2 --- /dev/null +++ b/src/Hooks/CCpp.cpp @@ -0,0 +1,94 @@ +/* + CCpp.cpp - the hook for C/C++ crashing program + + Copyright (C) 2009 Zdenek Prikryl (zprikryl@redhat.com) + Copyright (C) 2009 RedHat inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "DebugDump.h" +#include +#include +#include +#include +#include + +#define CORESTEP (1024) + +int main(int argc, char** argv) +{ + const char* program_name = argv[0]; + if (argc < 4) + { + fprintf(stderr, "Usage: %s: