fix bugs uint 64 + no trace
[lttv.git] / ltt / branches / poly / lttv / modules / gui / controlflow / drawing.c
CommitLineData
ce0214a6 1/* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2003-2004 Mathieu Desnoyers
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
fa2c4dbe 18
76a67e8a 19#include <gtk/gtk.h>
20#include <gdk/gdk.h>
f0d936c0 21
2a2fa4f0 22#include <lttv/lttv.h>
d8f124de 23#include <lttv/tracecontext.h>
2d262115 24#include <lttvwindow/lttvwindow.h>
b21c82b6 25#include <lttv/state.h>
f66eba62 26#include <lttv/hook.h>
831a876d 27
d66666fe 28#include "drawing.h"
a43d67ba 29#include "eventhooks.h"
d66666fe 30#include "cfv.h"
31#include "cfv-private.h"
6d5ed1c3 32
33#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
34#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
35
10a1069a 36//FIXME
37#define TRACE_NUMBER 0
38
e800cf84 39
40GdkColor drawing_colors[NUM_COLORS] =
41{ /* Pixel, R, G, B */
42 { 0, 0, 0, 0 }, /* COL_BLACK */
43 { 0, 0xFFFF, 0xFFFF, 0xFFFF }, /* COL_WHITE */
23093869 44 { 0, 0x0FFF, 0xFFFF, 0xFFFF }, /* COL_WAIT_FORK : pale blue */
45 { 0, 0xFFFF, 0xFFFF, 0x0000 }, /* COL_WAIT_CPU : yellow */
dbd243b1 46 { 0, 0xFFFF, 0xA000, 0xFCFF }, /* COL_EXIT : pale magenta */
23093869 47 { 0, 0xFFFF, 0x0000, 0xFFFF }, /* COL_ZOMBIE : purple */
48 { 0, 0xFFFF, 0x0000, 0x0000 }, /* COL_WAIT : red */
49 { 0, 0x0000, 0xFFFF, 0x0000 }, /* COL_RUN : green */
50 { 0, 0x8800, 0xFFFF, 0x8A00 }, /* COL_USER_MODE : pale green */
51 { 0, 0x09FF, 0x01FF, 0xFFFF }, /* COL_SYSCALL : blue */
52 { 0, 0xF900, 0x4200, 0xFF00 }, /* COL_TRAP : pale purple */
53 { 0, 0xFFFF, 0x5AFF, 0x01FF }, /* COL_IRQ : orange */
54 { 0, 0xFFFF, 0xFFFF, 0xFFFF } /* COL_MODE_UNKNOWN : white */
55
e800cf84 56};
7893f726 57/*
58RUN+USER MODE green
59RUN+SYSCALL
60RUN+TRAP
61RUN+IRQ