|
|
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 g
Length: 5023 (0x139f)
Types: TextFile
Names: »gdb-parse.c«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
└─⟦e10a7c8ba⟧ »./UNRELEASED/xgdb.tar.Z«
└─⟦ae30648b5⟧
└─⟦this⟧ »./gdb-parse.c«
\f
#ifndef lint
static char rcsid[] = "$Header: gdb-parse.c,v 1.1 89/07/05 15:35:59 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: February 10th, 1989.
*
* $Log: gdb-parse.c,v $
* Revision 1.1 89/07/05 15:35:59 hubbard
* Initial revision
*
*
*/
#include "xgdb.h"
#include <errno.h>
/*
* Debugger-dependent stuff for the GNU debugger (gdb).
* This file contains parsers specific to gdb's output. None of these
* routines send data to the debugger (all such routines are in gdb.c).
*/
/*
* Print output from the debugger. This is usually meant to
* be the last parser in the list (a "catch-all" parser) so it
* deletes all the output. Since there may be no text left, it
* also checks for NULL or zero length.
*/
String debuggerPrintOutput(P_ARGS)
P_ARG_DECL;
{
Entry("debuggerPrintOutput");
P_CHECKARGS;
viewAppendText(p->view, s, *len);
*len = 0;
dbg_state.S_outputSent = TRUE;
Leave(NULL);
}
/*
* This routine is responsible for catching all the error messages
* produced by the debugger, some of which may result in negotiations
* with it ("Yes, I *really* want to do that..").
*/
String debuggerParseErrors(P_ARGS)
P_ARG_DECL;
{
void debuggerYesOrNo();
static SimpleParser errors[] = {
{ "QST1", T_PROC, { (caddr_t)debuggerYesOrNo } },
{ "ERR1", T_PROC, { (caddr_t)popupErrorMessage } },
{ "ERR2", T_PROC, { (caddr_t)popupErrorMessage } },
{ "ERR3", T_PROC, { (caddr_t)popupErrorMessage } },
{ NULL, 0, { NULL } },
};
Entry("debuggerParseErrors");
P_CHECKARGS;
s = parseSimpleList(errors, P_ARGS);
Leave(s);
}
/*
* Parse what the debugger has printed and extract any interesting
* information.
*
* For now, the stuff parsed falls into two catagories: Simple one line
* informational messages (about what directory you've changed to,
* what the current core file is, etc) and multi-line bursts of information
* that need to be parsed more carefully. The one-liner's are handled with
* a SimpleParser list and the multi-liners are handed off to
* specialized routines or grubbed through here.
*/
String debuggerParseInfo(P_ARGS)
P_ARG_DECL;
{
void breakAddBreakpoint(), breakDeleteBreakpoint(),
debuggerQueryFunction();
static SimpleParser info[] = {
{ "GDBP", T_BOOL, { SO(S_promptSeen) } },
{ "FULL", T_ARGS, { SO(S_file), SO(S_line), 0,0, SO(S_address) } },
{ "BPK1", T_ARGS, { SO(S_breakpoint), SO(S_function) } },
{ "Fra6", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra0", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra1", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra2", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra5", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra4", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "Fra3", T_PROCS, { (caddr_t)stackHandleFrame } },
{ "BPI1", T_PROCS, { (caddr_t)breakAddBreakpoint } },
{ "BPI2", T_PROCS, { (caddr_t)breakAddBreakpoint } },
{ "NOLI", T_PROCS, { (caddr_t)sourceNoLineInfo } },
{ "BPI4", T_PROCS, { (caddr_t)breakDeleteBreakpoints } },
{ "BPI3", T_PROC, { (caddr_t)breakDeleteBreakpoint } },
{ "BPI5", T_PROC, { (caddr_t)breakDeleteBreakpoint } },
{ "BPI6", T_PROC, { (caddr_t)breakEnableBreakpoint } },
{ "BPI7", T_PROC, { (caddr_t)breakDisableBreakpoint } },
{ "StD1", T_ARG, { SO(S_dir) } },
{ "StD2", T_ARG, { SO(S_dir) } },
{ "StPa", T_ARG, { SO(S_file_path) } },
{ "StS1", T_ARG, { SO(S_symbol_file) } },
{ "StS2", T_ARG, { SO(S_symbol_file) } },
{ "StE1", T_ARG, { SO(S_exec_file) } },
{ "StE2", T_ARG, { SO(S_exec_file) } },
{ "StC1", T_ARG, { SO(S_core_file) } },
{ "StT1", T_ARG, { SO(S_text_segment) } },
{ "Std1", T_ARG, { SO(S_data_segment) } },
{ "Std2", T_ARG, { SO(S_data_segment) } },
{ "Sts1", T_ARG, { SO(S_stack_segment) } },
{ "BPI8", T_NOP, { NULL } },
{ NULL, 0, { NULL } },
};
Entry("parseDebuggerInfo");
P_CHECKARGS;
s = parseSimpleList(info, P_ARGS);
Leave(s);
}