|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 4933 (0x1345) Types: TextFile Names: »status.c«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦34cc4e2f7⟧ »./UNRELEASED/xgdb3.2.tar.Z« └─⟦80fac5d7c⟧ └─⟦this⟧ »./status.c« └─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦e10a7c8ba⟧ »./UNRELEASED/xgdb.tar.Z« └─⟦ae30648b5⟧ └─⟦this⟧ »./status.c«
\f #ifndef lint static char rcsid[] = "$Header: status.c,v 1.1 89/07/05 15:36:40 hubbard Exp $"; #endif /* * * Copyright 1988, 1989 * PCS Computer Systeme, GmbH * Munich, West Germany * * All rights reserved. * * This is unsupported software and is subject to change without notice. * PCS makes no representations about the suitability of this software * for any purpose. It is supplied "as is" without express or implied * warranty. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of PCS Computer Systeme not be used in * advertising or publicity pertaining to distribution of the software * without specific, written prior permission. * */ /* * Author: Jordan K. Hubbard * For: PCS Computer Systems, GmbH. * When: April 7th, 1989. * * $Log: status.c,v $ * Revision 1.1 89/07/05 15:36:40 hubbard * Initial revision * * */ #include "xgdb.h" static View *StatView; static struct { Field *fields; struct State o_state; } S_info; /* * Mapped? */ Boolean statusMapped() { Entry("statusMapped"); if (StatView) Leave(StatView->mapped); Leave(FALSE); } /* * Update all the state information. */ void statusUpdateView() { struct State *old, *new; Entry("statusUpdateView"); if (statusMapped()) { old = &S_info.o_state; new = &dbg_state; compareAndUpdateField(&(old->S_dir), new->S_dir, "current_dir", S_info.fields); compareAndUpdateField(&(old->S_file_path), new->S_file_path, "search_path", S_info.fields); compareAndUpdateField(&(old->S_exec_file), new->S_exec_file, "exec_file", S_info.fields); compareAndUpdateField(&(old->S_symbol_file), new->S_symbol_file, "symbol_file", S_info.fields); compareAndUpdateField(&(old->S_core_file), new->S_core_file, "core_file", S_info.fields); compareAndUpdateField(&(old->S_text_segment), new->S_text_segment, "text_segment", S_info.fields); compareAndUpdateField(&(old->S_data_segment), new->S_data_segment, "data_segment", S_info.fields); compareAndUpdateField(&(old->S_stack_segment), new->S_stack_segment, "stack_segment", S_info.fields); } Leave_void; } void statusCreateView(w, client_data, data) Widget w; caddr_t client_data, data; { Widget parent; static FormField buttons[] = { { { "close", viewCloseShell }, 2, FALSE, 0, 0, 0, 0 }, { { "update",debuggerQueryStatus }, 2, FALSE, 0, 0, 0, 1 }, { { NULL, NULL }, 0, 0, 0, 0, 0, 0 }, }; static FormField status[] = { { { "CWD:", NULL }, 0, FALSE, 5, 0, 0, 0 }, { { "current_dir", NULL }, 1, TRUE, 5, 78, 0, 1 }, { { "Search path:", NULL }, 0, FALSE, 10, 0, 1, 0 }, { { "search_path", NULL }, 1, TRUE, 10, 30, 1, 3 }, { { "Exec file:", NULL }, 0, FALSE, 10, 0, 3, 0 }, { { "exec_file", NULL }, 1, TRUE, 10, 42, 3, 5 }, { { "Symbol file:", NULL }, 0, FALSE, 10, 0, 5, 0 }, { { "symbol_file", NULL }, 1, TRUE, 10, 30, 5, 7 }, { { "Core file:", NULL }, 0, FALSE, 10, 0, 7, 0 }, { { "core_file", NULL }, 1, TRUE, 10, 42, 7, 9 }, { { "Text segment", NULL }, 0, FALSE, 20, 0, 9, 0 }, { { "text_segment", NULL }, 1, TRUE, 20, 30, 9, 11 }, { { "Data segment", NULL }, 0, FALSE, 10, 0, 11, 0 }, { { "data_segment", NULL }, 1, TRUE, 10, 30, 11, 13 }, { { "Stack segment", NULL }, 0, FALSE, 10, 0, 13, 0 }, { { "stack_segment", NULL }, 1, TRUE, 10, 23, 13, 15 }, { { NULL, NULL }, 0, 0, 0, 0, 0, 0 }, }; FieldAttributes fla; Field *flist; String name = ((w) ? XtWidgetToName(w) : (String)data); Entry("statusCreateView"); if (!StatView) { convertFormToField(buttons, &flist); ii = 0; XtSetArg(aa[ii], XtNallowVert, TRUE); ii++; XtSetArg(aa[ii], XtNallowHoriz, TRUE); ii++; XtSetArg(aa[ii], XtNmin, 50); ii++; XtSetArg(aa[ii], XtNmax, 1500); ii++; StatView = viewCreateShell(name, flist, viewportWidgetClass, aa, ii); parent = XtCreateManagedWidget("status_form", formWidgetClass, StatView->output, args, i); convertFormToField(status, &S_info.fields); createFields(parent, S_info.fields, StatView); } debuggerQueryStatus(); XtPopup(StatView->parent, XtGrabNone); XRaiseWindow(XtDisplay(StatView->parent), XtWindow(StatView->parent)); StatView->mapped = TRUE; /* Make the field that invoked us go insensitive */ fla.sensitive = FALSE; changeField(nameToField(name, client_data), FldSensitive, &fla); statusUpdateView(); Leave_void; }