Path: utzoo!mnetor!uunet!husc6!mailrus!ames!pasteur!ucbvax!latlog.UUCP!PAYNE From: PAYNE@latlog.UUCP Newsgroups: comp.windows.x Subject: xgdb.c Message-ID: <73.8805041145@latlog.co.uk> Date: 4 May 88 13:45:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 111 Sorry that this is so long but I had no other way of posting it. This is to encourage somebody else to put further work into this to iron out the remaining bugs. Please do NOT hassle me if you have problems. Known bugs: 1) The refresh doesn't work properly - use ctrl-L to redraw the screen. Enhancements: 1) It would be nice if there were two text windows, one for the text file and one as a shell for gdb. Julian Payne, European Silicon Structures (ES2) (payne@latlog.uucp) This is a rehack of xgdb.c -------------------------CUT HERE----------------------------------- /* Interface from GDB to X windows. Copyright (C) 1987 Free Software Foundation, Inc. GDB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the GDB General Public License for full details. Everyone is granted permission to copy, modify and redistribute GDB, but only under the conditions described in the GDB General Public License. A copy of this license is supposed to have been given to you along with GDB so you can know your rights and responsibilities. It should be in a file named COPYING. Among other things, the copyright notice and this notice must be preserved on all copies. In other words, go ahead and share GDB, but don't try to stop anyone else from sharing it farther. Help stamp out software hoarding! */ /* Original version was contributed by Derek Beatty, 30 June 87. */ /* * Rewritten to work under R2 intrinsics by Julian Payne, 23 April 88. */ #include "defs.h" #include "initialize.h" #include "param.h" #include "symtab.h" #include "frame.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Cursor used in GDB window. */ #define gdb_width 16 #define gdb_height 16 #define gdb_x_hot 7 #define gdb_y_hot 0 static short gdb_bits[] = { 0x0000, 0x0140, 0x0220, 0x0220, 0x23e2, 0x13e4, 0x09c8, 0x0ff8, 0x0220, 0x3ffe, 0x0630, 0x03e0, 0x0220, 0x1ffc, 0x2632, 0x01c0}; #define gdb_mask_width 16 #define gdb_mask_height 16 #define gdb_mask_x_hot 7 #define gdb_mask_y_hot 0 static short gdb_mask_bits[] = { 0x0360, 0x07f0, 0x07f0, 0x77f7, 0x7fff, 0x7fff, 0x1ffc, 0x1ffc, 0x7fff, 0x7fff, 0x7fff, 0x0ff8, 0x3ffe, 0x7fff, 0x7fff, 0x7fff}; /* The graphics context. */ GC default_gc; /* Windows manipulated by this package. */ static Widget toplevel; static Widget containing_widget; static Widget source_name_widget; static Widget source_text_widget = NULL; static Widget exec_name_widget; static Widget button_box_widget; /* Source text display. */ static struct symtab *source_window_symtab = 0; /* Forward declarations */ static Widget create_text_widget (); START_FILE