Blame src/mpi/debugger/mpi2_interface.h

Packit 0848f5
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
Packit 0848f5
/*  
Packit 0848f5
 *  (C) 2007 by Argonne National Laboratory.
Packit 0848f5
 *      See COPYRIGHT in top-level directory.
Packit 0848f5
 */
Packit 0848f5
/*
Packit 0848f5
 * Prototype of the MPI2 debugger interface
Packit 0848f5
 */
Packit 0848f5
Packit 0848f5
/* Basic types */
Packit 0848f5
typedef void *MPI2DD_ADDR_T;
Packit 0848f5
typedef int32_t MPI2DD_INT32_T;
Packit 0848f5
typedef uint32_t MPI2DD_UINT32_T;
Packit 0848f5
typedef unsigned char MPI2DD_BYTE_T;
Packit 0848f5
Packit 0848f5
/* Values for debug_state */
Packit 0848f5
#define MPI2DD_DEBUG_START                     1
Packit 0848f5
#define MPI2DD_DEBUG_SPAWN                     2
Packit 0848f5
#define MPI2DD_DEBUG_CONNECT                   3
Packit 0848f5
#define MPI2DD_DEBUG_ACCEPT                    4
Packit 0848f5
#define MPI2DD_DEBUG_JOIN                      5
Packit 0848f5
#define MPI2DD_DEBUG_DIRECTORY_CHANGED         6
Packit 0848f5
#define MPI2DD_DEBUG_METADIRECTORY_CHANGED     7
Packit 0848f5
#define MPI2DD_DEBUG_ABORT                     8
Packit 0848f5
Packit 0848f5
/* Values for debugger_flags */
Packit 0848f5
#define MPI2DD_FLAG_GATE    0x01
Packit 0848f5
#define MPI2DD_FLAG_BEING_DEBUGGED    0x02
Packit 0848f5
#define MPI2DD_FLAG_REQUEST_DIRECTORY_EVENTS 0x04
Packit 0848f5
Packit 0848f5
/* Values for mpi_flags */
Packit 0848f5
#define MPI2DD_MPIFLAG_I_AM_METADIR      0x01
Packit 0848f5
#define MPI2DD_MPIFLAG_I_AM_DIR          0x02
Packit 0848f5
#define MPI2DD_MPIFLAG_I_AM_STARTER      0x04
Packit 0848f5
#define MPI2DD_MPIFLAG_FORCE_TO_MAIN     0x08
Packit 0848f5
#define MPI2DD_MPIFLAG_IGNORE_QUEUE      0x10
Packit 0848f5
#define MPI2DD_MPIFLAG_ACQUIRED_PRE_MAIN 0x20
Packit 0848f5
#define MPI2DD_MPIFLAG_PARTIAL_ATTACH_OK 0x40
Packit 0848f5
Packit 0848f5
/* These structures are defined so that the debugger can find items
Packit 0848f5
   easily, even in the absense of detailed symbol table information, 
Packit 0848f5
   since the layout is fixed. */
Packit 0848f5
Packit 0848f5
typedef struct MPI2DD_PROCDESC {
Packit 0848f5
    MPI2DD_ADDR_T host_name;       /* ASCII name of IP address where debugger
Packit 0848f5
				      server can run */
Packit 0848f5
    MPI2DD_ADDR_T executable_name; /* ASCII name of executable */
Packit 0848f5
    MPI2DD_ADDR_T spawn_desc;      /* null if MPI-1, otherwise points to
Packit 0848f5
				      MPI2DD_SPAWNDESC structure */
Packit 0848f5
    MPI2DD_ADDR_T comm_world_id;   /* Unique ID for this COMM_WORLD */
Packit 0848f5
    MPI2DD_INT32_T pid;            /* Process ID */
Packit 0848f5
    MPI2DD_INT32_T rank;           /* Rank of process in COMM_WORLD */
Packit 0848f5
} MPI2DD_PROCDESC;
Packit 0848f5
Packit 0848f5
typedef struct MPI2DD_SPAWNDESC {
Packit 0848f5
    MPI2DD_ADDR_T parent_comm_world_id;  /* unique id of parent world */
Packit 0848f5
    MPI2DD_INT32_T parent_rank;          /* rank of parent in that comm */
Packit 0848f5
    MPI2DD_INT32_T sequence;             /* ordinal of this spawn in the
Packit 0848f5
					    spawns of the parent */
Packit 0848f5
} MPI2DD_SPAWNDESC;
Packit 0848f5
Packit 0848f5
typedef struct MPI2DD_INFO {
Packit 0848f5
    MPI2DD_BYTE_T magic[5];             /* the string M P I 2 0x7f */
Packit 0848f5
    MPI2DD_BYTE_T version;              /* 1 for now */
Packit 0848f5
    MPI2DD_BYTE_T variant;              /* 1 for now */
Packit 0848f5
    MPI2DD_BYTE_T debug_state;          /* See defines for MPI2DD_DEBUG_xxx */
Packit 0848f5
    MPI2DD_UINT32_T debugger_flags;     /* See defines under debugger flags */
Packit 0848f5
    MPI2DD_UINT32_T mpi_flags;          /* See defines under mpi flags */
Packit 0848f5
    MPI2DD_ADDR_T   dll_name_32;        /* path to msg queue debug lib for 
Packit 0848f5
					   32-bit executables */
Packit 0848f5
    MPI2DD_ADDR_T   dll_name_64;        /* as above, for 64-bit executables */
Packit 0848f5
    MPI2DD_ADDR_T   meta_host_name;     /* network name for metadirectory 
Packit 0848f5
					   process */
Packit 0848f5
    MPIDDD_ADDR_T   meta_executable_name;      /* Name of the meta directory
Packit 0848f5
						  executable */
Packit 0848f5
    MPI2DD_ADDR_T   abort_string;       /* Use this string when 
Packit 0848f5
					   breakpoint is triggered and
Packit 0848f5
					   debug state is ABORT */
Packit 0848f5
    MPI2DD_ADDR_T   proctable;          /* Null unless directory 
Packit 0848f5
					   process, then address of
Packit 0848f5
					   array of proctable entries */
Packit 0848f5
    MPI2DD_ADDR_T   directory_table;    /* Null unless metatdirectory 
Packit 0848f5
					   process, then address of
Packit 0848f5
					   array of directory entries */
Packit 0848f5
    MPI2DD_ADDR_T   metadirectory_table;/* As above, for directory
Packit 0848f5
					   entries of metadirectory
Packit 0848f5
					   servers */
Packit 0848f5
    MPI2DD_INT32_T  proctable_size;     /* size of proctable array */
Packit 0848f5
    MPI2DD_INT32_T  directory_size;     /* size of directory array */
Packit 0848f5
    MPI2DD_INT32_T  metadirctory_size;  /* size of metadirectory array */
Packit 0848f5
    MPI2DD_INT32_T  meta_pid;           /* pid of meta directory process */
Packit 0848f5
    MPI2DD_INT32_T  padding[8];         /* for future extensions */
Packit 0848f5
} MPI2DD_INFO;