summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-29 20:55:25 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-29 20:55:25 -0700
commit8abcc12fdd5bd9edc0288a1ab8f75e65ffcb8c71 (patch)
tree6b29239ee5a72ee88200900dc7adce20163cde2a /hw
parentaee19c7b5542aa147b89b1ae8340e9931d81729f (diff)
XQuartz: Added debugging output to the crash log to help track down two crashes, since people don't often report their system.log spew.
(cherry picked from commit aaf0f71db197526b6b866cc1b39fbdfe051879ef)
Diffstat (limited to 'hw')
-rw-r--r--hw/xquartz/darwin.c2
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c19
2 files changed, 17 insertions, 4 deletions
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 559bc8960..fb0a806d6 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -152,8 +152,6 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
#define XORG_RELEASE "?"
#endif
-const char *__crashreporter_info__ = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
-
void DDXRingBell(int volume, int pitch, int duration) {
// FIXME -- make some noise, yo
}
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 0eb45d157..6f1704e45 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -59,6 +59,18 @@ extern int noPanoramiXExtension;
#define DEFAULT_STARTX "/usr/X11/bin/startx"
#define DEFAULT_SHELL "/bin/sh"
+#ifndef BUILD_DATE
+#define BUILD_DATE ""
+#endif
+#ifndef XSERVER_VERSION
+#define XSERVER_VERSION "?"
+#endif
+
+const int __crashreporter_info__len = 4096;
+const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE;
+char __crashreporter_info__buf[4096];
+char *__crashreporter_info__ = __crashreporter_info__buf;
+
#define DEBUG 1
static int execute(const char *command);
@@ -389,7 +401,10 @@ int main(int argc, char **argv, char **envp) {
// The server must not run the PanoramiX operations.
noPanoramiXExtension = TRUE;
-
+
+ /* Setup the initial crasherporter info */
+ strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
+
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
for(i=0; i < argc; i++) {
fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
@@ -397,7 +412,7 @@ int main(int argc, char **argv, char **envp) {
listenOnly = TRUE;
}
}
-
+
mp = checkin_or_register(SERVER_BOOTSTRAP_NAME);
if(mp == MACH_PORT_NULL) {
fprintf(stderr, "NULL mach service: %s", SERVER_BOOTSTRAP_NAME);