Files
mercury/trace/mercury_trace_external.h
Zoltan Somogyi 233b899714 Avoid some C compiler warnings in the trace directory.
trace/mercury_trace.h:
    Avoid a warning from the C compiler about casting -1 to an enum
    by adding bool next to the enum that says whether the enum is actually
    defined, or is supposed to be set later (the latter is what the cast -1
    meant).

trace/mercury_trace_cmds.h:
    Rename the type MR_Trace_Command_Info to MR_TraceCmdTableEntry,
    since this (a) says more about the values of the type, (b) avoids
    confusion with the separate MR_TraceCmdInfo type (the one that
    contained the enum mentioned above), and (c) avoids combining
    underscores with CamelCase.

trace/mercury_trace_spy.c:
    Avoid some warnings about switches on enums specifying -1 as a case.

trace/mercury_trace.c:
trace/mercury_trace_*.[ch]:
    Conform to the above changes.
2014-08-09 02:19:35 +02:00

41 lines
1.4 KiB
C

/*
** vim: ts=4 sw=4 expandtab
*/
/*
** Copyright (C) 1998-2001, 2006 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
#ifndef MERCURY_TRACE_EXTERNAL_H
#define MERCURY_TRACE_EXTERNAL_H
#include "mercury_trace.h" /* for MR_TraceCmdInfo, etc. */
#include "mercury_conf.h" /* for MR_USE_EXTERNAL_DEBUGGER */
#include "mercury_types.h" /* for MR_Code */
#include "mercury_library_types.h" /* for MercuryFile */
#ifdef MR_USE_EXTERNAL_DEBUGGER
extern void MR_trace_init_external(void);
extern void MR_trace_final_external(void);
extern MR_Code *MR_trace_event_external(MR_TraceCmdInfo *cmd,
MR_EventInfo *event_info);
extern void MR_COLLECT_filter(MR_FilterFuncPtr filter_ptr,
MR_Unsigned seqno, MR_Unsigned depth, MR_TracePort port,
const MR_LabelLayout *layout,
const char *path, int lineno, MR_bool *stop_collecting);
extern int MR_get_line_number(MR_Word *saved_regs,
const MR_LabelLayout *layout, MR_TracePort port);
/*
** External debugger socket streams.
*/
extern MercuryFile MR_debugger_socket_in;
extern MercuryFile MR_debugger_socket_out;
#endif /* MR_USE_EXTERNAL_DEBUGGER */
#endif /* MERCURY_TRACE_EXTERNAL_H */