GDB (xrefs)
Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/p-lang.c File Reference
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "varobj.h"
#include "p-lang.h"
#include "valprint.h"
#include "value.h"
#include <ctype.h>

Go to the source code of this file.

Enumerations

enum  pascal_primitive_types {
  pascal_primitive_type_int, pascal_primitive_type_long, pascal_primitive_type_short, pascal_primitive_type_char,
  pascal_primitive_type_float, pascal_primitive_type_double, pascal_primitive_type_void, pascal_primitive_type_long_long,
  pascal_primitive_type_signed_char, pascal_primitive_type_unsigned_char, pascal_primitive_type_unsigned_short, pascal_primitive_type_unsigned_int,
  pascal_primitive_type_unsigned_long, pascal_primitive_type_unsigned_long_long, pascal_primitive_type_long_double, pascal_primitive_type_complex,
  pascal_primitive_type_double_complex, nr_pascal_primitive_types
}
 

Functions

void _initialize_pascal_language (void)
 
const char * pascal_main_name (void)
 
int is_pascal_string_type (struct type *type, int *length_pos, int *length_size, int *string_pos, struct type **char_type, const char **arrayname)
 
static void pascal_one_char (int, struct ui_file *, int *)
 
static void pascal_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
 
void pascal_printchar (int c, struct type *type, struct ui_file *stream)
 
void pascal_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options)
 
static void pascal_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
 

Variables

static const char GPC_P_INITIALIZE [] = "_p_initialize"
 
static const char GPC_MAIN_PROGRAM_NAME_1 [] = "_p__M0_main_program"
 
static const char GPC_MAIN_PROGRAM_NAME_2 [] = "pascal_main_program"
 
const struct op_print pascal_op_print_tab []
 
const struct language_defn pascal_language_defn
 

Enumeration Type Documentation

Enumerator
pascal_primitive_type_int 
pascal_primitive_type_long 
pascal_primitive_type_short 
pascal_primitive_type_char 
pascal_primitive_type_float 
pascal_primitive_type_double 
pascal_primitive_type_void 
pascal_primitive_type_long_long 
pascal_primitive_type_signed_char 
pascal_primitive_type_unsigned_char 
pascal_primitive_type_unsigned_short 
pascal_primitive_type_unsigned_int 
pascal_primitive_type_unsigned_long 
pascal_primitive_type_unsigned_long_long 
pascal_primitive_type_long_double 
pascal_primitive_type_complex 
pascal_primitive_type_double_complex 
nr_pascal_primitive_types 

Definition at line 345 of file p-lang.c.

Function Documentation

void _initialize_pascal_language ( void  )

Definition at line 460 of file p-lang.c.

References add_language().

int is_pascal_string_type ( struct type type,
int length_pos,
int length_size,
int string_pos,
struct type **  char_type,
const char **  arrayname 
)
static void pascal_emit_char ( int  c,
struct type type,
struct ui_file stream,
int  quoter 
)
static

Definition at line 193 of file p-lang.c.

References fputs_filtered(), and pascal_one_char().

static void pascal_language_arch_info ( struct gdbarch gdbarch,
struct language_arch_info lai 
)
static
const char* pascal_main_name ( void  )
static void pascal_one_char ( int  c,
struct ui_file stream,
int in_quotes 
)
static
void pascal_printchar ( int  c,
struct type type,
struct ui_file stream 
)

Definition at line 203 of file p-lang.c.

References fputs_filtered(), and pascal_one_char().

Referenced by pascal_printstr().

void pascal_printstr ( struct ui_file stream,
struct type type,
const gdb_byte string,
unsigned int  length,
const char *  encoding,
int  force_ellipses,
const struct value_print_options options 
)

Variable Documentation

const char GPC_MAIN_PROGRAM_NAME_1[] = "_p__M0_main_program"
static

Definition at line 43 of file p-lang.c.

Referenced by pascal_main_name().

const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program"
static

Definition at line 47 of file p-lang.c.

Referenced by pascal_main_name().

const char GPC_P_INITIALIZE[] = "_p_initialize"
static

Definition at line 39 of file p-lang.c.

Referenced by pascal_main_name().

const struct language_defn pascal_language_defn

Definition at line 415 of file p-lang.c.

const struct op_print pascal_op_print_tab[]
Initial value:
=
{
{",", BINOP_COMMA, PREC_COMMA, 0},
{":=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{"or", BINOP_BITWISE_IOR, PREC_BITWISE_IOR, 0},
{"xor", BINOP_BITWISE_XOR, PREC_BITWISE_XOR, 0},
{"and", BINOP_BITWISE_AND, PREC_BITWISE_AND, 0},
{"=", BINOP_EQUAL, PREC_EQUAL, 0},
{"<>", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{"<=", BINOP_LEQ, PREC_ORDER, 0},
{">=", BINOP_GEQ, PREC_ORDER, 0},
{">", BINOP_GTR, PREC_ORDER, 0},
{"<", BINOP_LESS, PREC_ORDER, 0},
{"shr", BINOP_RSH, PREC_SHIFT, 0},
{"shl", BINOP_LSH, PREC_SHIFT, 0},
{"+", BINOP_ADD, PREC_ADD, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"div", BINOP_INTDIV, PREC_MUL, 0},
{"mod", BINOP_REM, PREC_MUL, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0},
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"not", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{"^", UNOP_IND, PREC_SUFFIX, 1},
{"@", UNOP_ADDR, PREC_PREFIX, 0},
{"sizeof", UNOP_SIZEOF, PREC_PREFIX, 0},
{NULL, 0, 0, 0}
}

Definition at line 315 of file p-lang.c.