GDB (xrefs)
Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/f-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 "f-lang.h"
#include "valprint.h"
#include "value.h"
#include "cp-support.h"
#include "charset.h"
#include "c-lang.h"

Go to the source code of this file.

Enumerations

enum  f_primitive_types {
  f_primitive_type_character, f_primitive_type_logical, f_primitive_type_logical_s1, f_primitive_type_logical_s2,
  f_primitive_type_logical_s8, f_primitive_type_integer, f_primitive_type_integer_s2, f_primitive_type_real,
  f_primitive_type_real_s8, f_primitive_type_real_s16, f_primitive_type_complex_s8, f_primitive_type_complex_s16,
  f_primitive_type_void, nr_f_primitive_types
}
 

Functions

static void f_printchar (int c, struct type *type, struct ui_file *stream)
 
static void f_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
 
static const char * f_get_encoding (struct type *type)
 
static void f_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 f_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
 
static const char * f_word_break_characters (void)
 
static void f_collect_symbol_completion_matches (completion_tracker &tracker, complete_symbol_mode mode, symbol_name_match_type compare_name, const char *text, const char *word, enum type_code code)
 
static void * build_fortran_types (struct gdbarch *gdbarch)
 
const struct builtin_f_typebuiltin_f_type (struct gdbarch *gdbarch)
 
void _initialize_f_language (void)
 

Variables

static const struct op_print f_op_print_tab []
 
static const char * f_extensions []
 
const struct language_defn f_language_defn
 
static struct gdbarch_dataf_type_data
 

Enumeration Type Documentation

◆ f_primitive_types

Enumerator
f_primitive_type_character 
f_primitive_type_logical 
f_primitive_type_logical_s1 
f_primitive_type_logical_s2 
f_primitive_type_logical_s8 
f_primitive_type_integer 
f_primitive_type_integer_s2 
f_primitive_type_real 
f_primitive_type_real_s8 
f_primitive_type_real_s16 
f_primitive_type_complex_s8 
f_primitive_type_complex_s16 
f_primitive_type_void 
nr_f_primitive_types 

Definition at line 147 of file f-lang.c.

Function Documentation

◆ _initialize_f_language()

void _initialize_f_language ( void  )

Definition at line 370 of file f-lang.c.

References build_fortran_types(), f_type_data, and gdbarch_data_register_post_init().

◆ build_fortran_types()

static void* build_fortran_types ( struct gdbarch gdbarch)
static

◆ builtin_f_type()

const struct builtin_f_type* builtin_f_type ( struct gdbarch gdbarch)

Definition at line 364 of file f-lang.c.

References f_type_data, and gdbarch_data().

Referenced by build_fortran_types(), and f_language_arch_info().

◆ f_collect_symbol_completion_matches()

static void f_collect_symbol_completion_matches ( completion_tracker tracker,
complete_symbol_mode  mode,
symbol_name_match_type  compare_name,
const char *  text,
const char *  word,
enum type_code  code 
)
static

Definition at line 230 of file f-lang.c.

References code, and default_collect_symbol_completion_matches_break_on().

◆ f_emit_char()

static void f_emit_char ( int  c,
struct type type,
struct ui_file stream,
int  quoter 
)
static

Definition at line 78 of file f-lang.c.

References f_get_encoding(), and generic_emit_char().

◆ f_get_encoding()

static const char* f_get_encoding ( struct type type)
static

Definition at line 48 of file f-lang.c.

References _, error(), gdbarch_byte_order(), get_type_arch(), target_charset(), and TYPE_LENGTH.

Referenced by f_emit_char(), and f_printstr().

◆ f_language_arch_info()

static void f_language_arch_info ( struct gdbarch gdbarch,
struct language_arch_info lai 
)
static

◆ f_printchar()

static void f_printchar ( int  c,
struct type type,
struct ui_file stream 
)
static

Definition at line 88 of file f-lang.c.

References fputs_filtered(), and LA_EMIT_CHAR.

◆ f_printstr()

static void f_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

Definition at line 103 of file f-lang.c.

References f_get_encoding(), fputs_filtered(), generic_printstr(), and TYPE_LENGTH.

◆ f_word_break_characters()

static const char* f_word_break_characters ( void  )
static

Definition at line 205 of file f-lang.c.

References default_word_break_characters().

Variable Documentation

◆ f_extensions

const char* f_extensions[]
static
Initial value:
=
{
".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
".f90", ".F90", ".f95", ".F95", ".f03", ".F03", ".f08", ".F08",
NULL
}

Definition at line 241 of file f-lang.c.

◆ f_language_defn

const struct language_defn f_language_defn

◆ f_op_print_tab

const struct op_print f_op_print_tab[]
static
Initial value:
=
{
{"+", BINOP_ADD, PREC_ADD, 0},
{"+", UNOP_PLUS, PREC_PREFIX, 0},
{"-", BINOP_SUB, PREC_ADD, 0},
{"-", UNOP_NEG, PREC_PREFIX, 0},
{"*", BINOP_MUL, PREC_MUL, 0},
{"/", BINOP_DIV, PREC_MUL, 0},
{"DIV", BINOP_INTDIV, PREC_MUL, 0},
{"MOD", BINOP_REM, PREC_MUL, 0},
{"=", BINOP_ASSIGN, PREC_ASSIGN, 1},
{".OR.", BINOP_LOGICAL_OR, PREC_LOGICAL_OR, 0},
{".AND.", BINOP_LOGICAL_AND, PREC_LOGICAL_AND, 0},
{".NOT.", UNOP_LOGICAL_NOT, PREC_PREFIX, 0},
{".EQ.", BINOP_EQUAL, PREC_EQUAL, 0},
{".NE.", BINOP_NOTEQUAL, PREC_EQUAL, 0},
{".LE.", BINOP_LEQ, PREC_ORDER, 0},
{".GE.", BINOP_GEQ, PREC_ORDER, 0},
{".GT.", BINOP_GTR, PREC_ORDER, 0},
{".LT.", BINOP_LESS, PREC_ORDER, 0},
{"**", UNOP_IND, PREC_PREFIX, 0},
{"@", BINOP_REPEAT, PREC_REPEAT, 0},
{NULL, OP_NULL, PREC_REPEAT, 0}
}

Definition at line 122 of file f-lang.c.

◆ f_type_data

struct gdbarch_data* f_type_data
static

Definition at line 361 of file f-lang.c.

Referenced by _initialize_f_language(), and builtin_f_type().