bug-buddy r2733 - in trunk: . gnome-breakpad src
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: bug-buddy r2733 - in trunk: . gnome-breakpad src
- Date: Fri, 26 Sep 2008 23:20:46 +0000 (UTC)
Author: cosimoc
Date: Fri Sep 26 23:20:46 2008
New Revision: 2733
URL: http://svn.gnome.org/viewvc/bug-buddy?rev=2733&view=rev
Log:
2008-09-27 Cosimo Cecchi <cosimoc gnome org>
* gnome-breakpad/gnome-breakpad.cc:
* src/gnome-crash.c:
Use g_file_read_link () instead of readlink () and some minor style
fixes.
Modified:
trunk/ChangeLog
trunk/gnome-breakpad/gnome-breakpad.cc
trunk/src/gnome-crash.c
Modified: trunk/gnome-breakpad/gnome-breakpad.cc
==============================================================================
--- trunk/gnome-breakpad/gnome-breakpad.cc (original)
+++ trunk/gnome-breakpad/gnome-breakpad.cc Fri Sep 26 23:20:46 2008
@@ -1,5 +1,4 @@
-#include <pthread.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
@@ -41,7 +40,7 @@
#ifdef ENABLE_GOOGLE_BREAKPAD
static ExceptionHandler * handler;
-// Callback when minidump written.
+/* Callback when minidump written. */
static bool MinidumpCallback(const char *dump_path,
const char *minidump_id,
void *context,
@@ -122,7 +121,7 @@
return result;
}
-
+
static gboolean
elf_has_debug_symbols (const char *filename)
@@ -259,9 +258,9 @@
static void
check_if_gdb ()
{
- char mypath[255];
+ char *mypath;
gchar *gdb;
- bool has_debug_symbols;
+ bool has_debug_symbols = false;
char *filename;
gchar *appname;
pid_t pid;
@@ -283,9 +282,11 @@
_exit(0);
}
- memset(mypath, 0, sizeof(mypath));
- readlink ("/proc/self/exe", mypath, sizeof(mypath));
- has_debug_symbols = elf_has_debug_symbols (mypath);
+ mypath = g_file_read_link ("/proc/self/exe", NULL);
+ if (mypath)
+ has_debug_symbols = elf_has_debug_symbols (mypath);
+
+ g_free (mypath);
if (bugbuddy && gdb && has_debug_symbols) {
res = run_bug_buddy (appname, pid, NULL);
Modified: trunk/src/gnome-crash.c
==============================================================================
--- trunk/src/gnome-crash.c (original)
+++ trunk/src/gnome-crash.c Fri Sep 26 23:20:46 2008
@@ -1,4 +1,4 @@
-/* gnome program that crashes
+/* gtk program that crashes
*
* Copyright (C) Jacob Berkman
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]