GDB (xrefs)

Enumerations | Functions | Variables
/tmp/gdb-8.1/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>`
`#include "c-lang.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
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 []
static const char * | p_extensions []
const struct language_defn | pascal_language_defn

## Enumeration Type Documentation

## ◆ pascal_primitive_types

enum pascal_primitive_types

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 343 of file p-lang.c.

## Function Documentation

## ◆ is_pascal_string_type()

int is_pascal_string_type | ( | struct type * | type,
|  | int * | length_pos,
|  | int * | length_size,
|  | int * | string_pos,
|  | struct type ** | char_type,
|  | const char ** | arrayname
| ) |  |

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

References TARGET_CHAR_BIT, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_FIELD_BITPOS, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, TYPE_LENGTH, TYPE_NFIELDS, and TYPE_TARGET_TYPE.

Referenced by pascal_val_print(), and yyparse().

## ◆ pascal_emit_char()

static void pascal_emit_char | ( | int | c,
|  | struct type * | type,
|  | struct ui_file * | stream,
|  | int | quoter
| ) |  |
| static

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

References fputs_filtered(), and pascal_one_char().

## ◆ pascal_language_arch_info()

static void pascal_language_arch_info | ( | struct gdbarch * | gdbarch,
|  | struct language_arch_info * | lai
| ) |  |
| static

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

References language_arch_info::bool_type_default, language_arch_info::bool_type_symbol, builtin_type::builtin_bool, builtin_type::builtin_char, builtin_type::builtin_complex, builtin_type::builtin_double, builtin_type::builtin_double_complex, builtin_type::builtin_float, builtin_type::builtin_int, builtin_type::builtin_long, builtin_type::builtin_long_double, builtin_type::builtin_long_long, builtin_type::builtin_short, builtin_type::builtin_signed_char, builtin_type(), builtin_type::builtin_unsigned_char, builtin_type::builtin_unsigned_int, builtin_type::builtin_unsigned_long, builtin_type::builtin_unsigned_long_long, builtin_type::builtin_unsigned_short, builtin_type::builtin_void, GDBARCH_OBSTACK_CALLOC, nr_pascal_primitive_types, pascal_primitive_type_char, pascal_primitive_type_complex, pascal_primitive_type_double, pascal_primitive_type_double_complex, pascal_primitive_type_float, pascal_primitive_type_int, pascal_primitive_type_long, pascal_primitive_type_long_double, pascal_primitive_type_long_long, pascal_primitive_type_short, pascal_primitive_type_signed_char, pascal_primitive_type_unsigned_char, pascal_primitive_type_unsigned_int, pascal_primitive_type_unsigned_long, pascal_primitive_type_unsigned_long_long, pascal_primitive_type_unsigned_short, pascal_primitive_type_void, language_arch_info::primitive_type_vector, and language_arch_info::string_char_type.

## ◆ pascal_main_name()

const char* pascal_main_name | ( | void |  | ) |

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

References GPC_MAIN_PROGRAM_NAME_1, GPC_MAIN_PROGRAM_NAME_2, GPC_P_INITIALIZE, and lookup_minimal_symbol().

Referenced by find_main_name().

## ◆ pascal_one_char()

static void pascal_one_char | ( | int | c,
|  | struct ui_file * | stream,
|  | int * | in_quotes
| ) |  |
| static

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

References fprintf_filtered(), fputs_filtered(), and PRINT_LITERAL_FORM.

Referenced by pascal_emit_char(), pascal_printchar(), and pascal_printstr().

## ◆ pascal_printchar()

void pascal_printchar | ( | int | c,
|  | struct type * | type,
|  | struct ui_file * | stream
| ) |  |

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

References fputs_filtered(), and pascal_one_char().

Referenced by pascal_printstr().

## ◆ 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
| ) |  |

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

References check_typedef(), extract_unsigned_integer(), fprintf_filtered(), fputs_filtered(), gdbarch_byte_order(), get_type_arch(), pascal_one_char(), pascal_printchar(), PRINT_LITERAL_FORM, value_print_options::print_max, QUIT, value_print_options::repeat_count_threshold, and TYPE_LENGTH.

## Variable Documentation

## ◆ GPC_MAIN_PROGRAM_NAME_1

const char GPC_MAIN_PROGRAM_NAME_1[] = "_p__M0_main_program"
| static

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

Referenced by pascal_main_name().

## ◆ GPC_MAIN_PROGRAM_NAME_2

const char GPC_MAIN_PROGRAM_NAME_2[] = "pascal_main_program"
| static

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

Referenced by pascal_main_name().

## ◆ GPC_P_INITIALIZE

const char GPC_P_INITIALIZE[] = "_p_initialize"
| static

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

Referenced by pascal_main_name().

## ◆ p_extensions

const char* p_extensions[]
| static

Initial value:
=
{
".pas", ".p", ".pp", NULL
}

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

## ◆ pascal_language_defn

const struct language_defn pascal_language_defn

## ◆ pascal_op_print_tab

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, OP_NULL, PREC_PREFIX, 0}
}
PREC_ADD
Definition: parser-defs.h:298
PREC_PREFIX
Definition: parser-defs.h:299
PREC_EQUAL
Definition: parser-defs.h:298
PREC_ORDER
Definition: parser-defs.h:298
PREC_BITWISE_XOR
Definition: parser-defs.h:297
PREC_MUL
Definition: parser-defs.h:298
PREC_BITWISE_IOR
Definition: parser-defs.h:297
PREC_BITWISE_AND
Definition: parser-defs.h:297
PREC_ASSIGN
Definition: parser-defs.h:296
PREC_SUFFIX
Definition: parser-defs.h:299
PREC_REPEAT
Definition: parser-defs.h:298
PREC_SHIFT
Definition: parser-defs.h:298
PREC_COMMA
Definition: parser-defs.h:296

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