GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
c-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 "c-lang.h"
#include "c-support.h"
#include "valprint.h"
#include "macroscope.h"
#include "charset.h"
#include "demangle.h"
#include "cp-abi.h"
#include "cp-support.h"
#include "gdbsupport/gdb_obstack.h"
#include <ctype.h>
#include "gdbcore.h"
#include "gdbarch.h"
#include "compile/compile-internal.h"
#include "c-exp.h"

Go to the source code of this file.

Classes

class  c_language
 
class  cplus_language
 
class  asm_language
 
class  minimal_language
 

Namespaces

namespace  expr
 

Macros

#define ADVANCE
 

Functions

static const char * charset_for_string_type (c_string_type str_type, struct gdbarch *gdbarch)
 
static c_string_type classify_type (struct type *elttype, struct gdbarch *gdbarch, const char **encoding)
 
void c_get_string (struct value *value, gdb::unique_xmalloc_ptr< gdb_byte > *buffer, int *length, struct type **char_type, const char **charset)
 
static const char * convert_ucn (const char *p, const char *limit, const char *dest_charset, struct obstack *output, int length)
 
static void emit_numeric_character (struct type *type, unsigned long value, struct obstack *output)
 
static const char * convert_octal (struct type *type, const char *p, const char *limit, struct obstack *output)
 
static const char * convert_hex (struct type *type, const char *p, const char *limit, struct obstack *output)
 
static const char * convert_escape (struct type *type, const char *dest_charset, const char *p, const char *limit, struct obstack *output)
 
static void parse_one_string (struct obstack *output, const char *data, int len, const char *dest_charset, struct type *type)
 
bool c_is_string_type_p (struct type *type)
 
gdb::unique_xmalloc_ptr< char > c_canonicalize_name (const char *name)
 
void c_language_arch_info (struct gdbarch *gdbarch, struct language_arch_info *lai)
 

Variables

static c_language c_language_defn
 
static cplus_language cplus_language_defn
 
static asm_language asm_language_defn
 
static minimal_language minimal_language_defn
 

Macro Definition Documentation

◆ ADVANCE

#define ADVANCE
Value:
do { \
++p; \
if (p == limit) \
error (_("Malformed escape sequence")); \
} while (0)

Definition at line 488 of file c-lang.c.

Function Documentation

◆ c_canonicalize_name()

gdb::unique_xmalloc_ptr< char > c_canonicalize_name ( const char *  name)

◆ c_get_string()

void c_get_string ( struct value value,
gdb::unique_xmalloc_ptr< gdb_byte > *  buffer,
int *  length,
struct type **  char_type,
const char **  charset 
)

◆ c_is_string_type_p()

bool c_is_string_type_p ( struct type type)

◆ c_language_arch_info()

void c_language_arch_info ( struct gdbarch gdbarch,
struct language_arch_info lai 
)

◆ charset_for_string_type()

static const char * charset_for_string_type ( c_string_type  str_type,
struct gdbarch gdbarch 
)
static

◆ classify_type()

static c_string_type classify_type ( struct type elttype,
struct gdbarch gdbarch,
const char **  encoding 
)
static

◆ convert_escape()

static const char * convert_escape ( struct type type,
const char *  dest_charset,
const char *  p,
const char *  limit,
struct obstack *  output 
)
static

Definition at line 503 of file c-lang.c.

References ADVANCE, convert_hex(), convert_octal(), convert_ucn(), and type::length().

Referenced by parse_one_string().

◆ convert_hex()

static const char * convert_hex ( struct type type,
const char *  p,
const char *  limit,
struct obstack *  output 
)
static

Definition at line 472 of file c-lang.c.

References emit_numeric_character().

Referenced by convert_escape().

◆ convert_octal()

static const char * convert_octal ( struct type type,
const char *  p,
const char *  limit,
struct obstack *  output 
)
static

Definition at line 447 of file c-lang.c.

References emit_numeric_character().

Referenced by convert_escape().

◆ convert_ucn()

static const char * convert_ucn ( const char *  p,
const char *  limit,
const char *  dest_charset,
struct obstack *  output,
int  length 
)
static

Definition at line 405 of file c-lang.c.

References convert_between_encodings(), type::length(), and translit_none.

Referenced by convert_escape().

◆ emit_numeric_character()

static void emit_numeric_character ( struct type type,
unsigned long  value,
struct obstack *  output 
)
static

Definition at line 431 of file c-lang.c.

References type::length(), and pack_long().

Referenced by convert_hex(), and convert_octal().

◆ parse_one_string()

static void parse_one_string ( struct obstack *  output,
const char *  data,
int  len,
const char *  dest_charset,
struct type type 
)
static

Variable Documentation

◆ asm_language_defn

asm_language asm_language_defn
static

Definition at line 1123 of file c-lang.c.

◆ c_language_defn

c_language c_language_defn
static

Definition at line 860 of file c-lang.c.

◆ cplus_language_defn

cplus_language cplus_language_defn
static

Definition at line 1056 of file c-lang.c.

◆ minimal_language_defn

minimal_language minimal_language_defn
static

Definition at line 1182 of file c-lang.c.