GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
compile-cplus-types.c File Reference
#include "defs.h"
#include "gdbsupport/preprocessor.h"
#include "gdbtypes.h"
#include "compile-internal.h"
#include "compile-cplus.h"
#include "gdbsupport/gdb_assert.h"
#include "symtab.h"
#include "source.h"
#include "cp-support.h"
#include "cp-abi.h"
#include "objfiles.h"
#include "block.h"
#include "gdbcmd.h"
#include "c-lang.h"
#include "compile-c.h"
#include <algorithm>
#include "gcc-cp-fe.def"

Go to the source code of this file.

Macros

#define FORWARD(OP, ...)   m_context->cp_ops->OP(m_context, ##__VA_ARGS__)
 
#define OUTPUT_DEBUG_RESULT(R)
 
#define GCC_METHOD0(R, N)
 
#define GCC_METHOD1(R, N, A)
 
#define GCC_METHOD2(R, N, A, B)
 
#define GCC_METHOD3(R, N, A, B, C)
 
#define GCC_METHOD4(R, N, A, B, C, D)
 
#define GCC_METHOD5(R, N, A, B, C, D, E)
 
#define GCC_METHOD7(R, N, A, B, C, D, E, F, G)
 

Functions

static gcc_type compile_cplus_convert_func (compile_cplus_instance *instance, struct type *type, bool strip_artificial)
 
static enum gcc_cp_symbol_kind get_field_access_flag (const struct type *type, int num)
 
enum gcc_cp_symbol_kind get_method_access_flag (const struct type *type, int fni, int num)
 
static void __attribute__ ((used))
 
compile_scope type_name_to_scope (const char *type_name, const struct block *block)
 
bool operator== (const scope_component &lhs, const scope_component &rhs)
 
bool operator!= (const scope_component &lhs, const scope_component &rhs)
 
bool operator== (const compile_scope &lhs, const compile_scope &rhs)
 
bool operator!= (const compile_scope &lhs, const compile_scope &rhs)
 
static gcc_type compile_cplus_convert_reference (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_pointer (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_array (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_typedef (compile_cplus_instance *instance, struct type *type, enum gcc_cp_symbol_kind nested_access)
 
static void compile_cplus_convert_type_defns (compile_cplus_instance *instance, struct type *type)
 
static void compile_cplus_convert_struct_or_union_members (compile_cplus_instance *instance, struct type *type, gcc_type comp_type)
 
static gcc_type compile_cplus_convert_method (compile_cplus_instance *instance, struct type *parent_type, struct type *method_type)
 
static gcc_type compile_cplus_convert_memberptr (compile_cplus_instance *instance, struct type *type)
 
static void compile_cplus_convert_struct_or_union_methods (compile_cplus_instance *instance, struct type *type, gcc_type class_type)
 
static gcc_type compile_cplus_convert_struct_or_union (compile_cplus_instance *instance, struct type *type, enum gcc_cp_symbol_kind nested_access)
 
static gcc_type compile_cplus_convert_enum (compile_cplus_instance *instance, struct type *type, enum gcc_cp_symbol_kind nested_access)
 
static gcc_type compile_cplus_convert_int (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_float (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_void (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_bool (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_qualified (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_complex (compile_cplus_instance *instance, struct type *type)
 
static gcc_type compile_cplus_convert_namespace (compile_cplus_instance *instance, struct type *type)
 
static gcc_type convert_type_cplus_basic (compile_cplus_instance *instance, struct type *type, enum gcc_cp_symbol_kind nested_access)
 
static void compile_cplus_debug_output_1 (ULONGEST arg)
 
static void compile_cplus_debug_output_1 (const char *arg)
 
static void compile_cplus_debug_output ()
 
template<typename T >
static void compile_cplus_debug_output_1 (const T *arg)
 
template<typename T , typename... Targs>
static void compile_cplus_debug_output (T arg, Targs... Args)
 
void _initialize_compile_cplus_types ()
 

Variables

static bool debug_compile_cplus_types = false
 
static bool debug_compile_cplus_scopes = false
 

Macro Definition Documentation

◆ FORWARD

#define FORWARD ( OP,
... )   m_context->cp_ops->OP(m_context, ##__VA_ARGS__)

Definition at line 1270 of file compile-cplus-types.c.

◆ GCC_METHOD0

#define GCC_METHOD0 ( R,
N )
Value:
R gcc_cp_plugin::N () const \
{ \
compile_cplus_debug_output (STRINGIFY (N)); \
auto result = FORWARD (N); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}
#define FORWARD(OP,...)
static bool debug_compile_cplus_types
#define R(name, type, sim_num)
Definition m32c-tdep.c:731

Definition at line 1279 of file compile-cplus-types.c.

◆ GCC_METHOD1

#define GCC_METHOD1 ( R,
N,
A )
Value:
R gcc_cp_plugin::N (A a) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a); \
auto result = FORWARD (N, a); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}
#define FORWARD(OP,...)
@ A
Definition ia64-tdep.c:80

Definition at line 1288 of file compile-cplus-types.c.

◆ GCC_METHOD2

#define GCC_METHOD2 ( R,
N,
A,
B )
Value:
R gcc_cp_plugin::N (A a, B b) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a, b); \
auto result = FORWARD (N, a, b); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}
@ B

Definition at line 1297 of file compile-cplus-types.c.

◆ GCC_METHOD3

#define GCC_METHOD3 ( R,
N,
A,
B,
C )
Value:
R gcc_cp_plugin::N (A a, B b, C c) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a, b, c); \
auto result = FORWARD (N, a, b, c); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}

Definition at line 1306 of file compile-cplus-types.c.

◆ GCC_METHOD4

#define GCC_METHOD4 ( R,
N,
A,
B,
C,
D )
Value:
R gcc_cp_plugin::N (A a, B b, C c, D d) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a, b, c, d); \
auto result = FORWARD (N, a, b, c, d); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}

Definition at line 1315 of file compile-cplus-types.c.

◆ GCC_METHOD5

#define GCC_METHOD5 ( R,
N,
A,
B,
C,
D,
E )
Value:
R gcc_cp_plugin::N (A a, B b, C c, D d, E e) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a, b, c, d, e); \
auto result = FORWARD (N, a, b, c, d, e); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}

Definition at line 1324 of file compile-cplus-types.c.

◆ GCC_METHOD7

#define GCC_METHOD7 ( R,
N,
A,
B,
C,
D,
E,
F,
G )
Value:
R gcc_cp_plugin::N (A a, B b, C c, D d, E e, F f, G g) const \
{ \
compile_cplus_debug_output (STRINGIFY (N), a, b, c, d, e, f, g); \
auto result = FORWARD (N, a, b, c, d, e, f, g); \
OUTPUT_DEBUG_RESULT (result); \
return result; \
}
void f()
Definition 1.cc:36
@ F
Definition ia64-tdep.c:83
#define G(reg)
Definition m32c-tdep.c:796

Definition at line 1333 of file compile-cplus-types.c.

◆ OUTPUT_DEBUG_RESULT

#define OUTPUT_DEBUG_RESULT ( R)
Value:
{ \
gdb_puts (": ", gdb_stdlog); \
compile_cplus_debug_output (R); \
gdb_putc ('\n', gdb_stdlog); \
} \
#define gdb_stdlog
Definition utils.h:190

Definition at line 1271 of file compile-cplus-types.c.

Function Documentation

◆ __attribute__()

static void __attribute__ ( (used) )
static

Definition at line 109 of file compile-cplus-types.c.

References printf_unfiltered().

◆ _initialize_compile_cplus_types()

void _initialize_compile_cplus_types ( )

Definition at line 1400 of file compile-cplus-types.c.

Referenced by initialize_all_files().

◆ compile_cplus_convert_array()

static gcc_type compile_cplus_convert_array ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_bool()

static gcc_type compile_cplus_convert_bool ( compile_cplus_instance * instance,
struct type * type )
static

Definition at line 1040 of file compile-cplus-types.c.

References compile_cplus_instance::plugin().

Referenced by convert_type_cplus_basic().

◆ compile_cplus_convert_complex()

static gcc_type compile_cplus_convert_complex ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_enum()

static gcc_type compile_cplus_convert_enum ( compile_cplus_instance * instance,
struct type * type,
enum gcc_cp_symbol_kind nested_access )
static

◆ compile_cplus_convert_float()

static gcc_type compile_cplus_convert_float ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_func()

static gcc_type compile_cplus_convert_func ( compile_cplus_instance * instance,
struct type * type,
bool strip_artificial )
static

◆ compile_cplus_convert_int()

static gcc_type compile_cplus_convert_int ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_memberptr()

static gcc_type compile_cplus_convert_memberptr ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_method()

static gcc_type compile_cplus_convert_method ( compile_cplus_instance * instance,
struct type * parent_type,
struct type * method_type )
static

◆ compile_cplus_convert_namespace()

static gcc_type compile_cplus_convert_namespace ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_pointer()

static gcc_type compile_cplus_convert_pointer ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_qualified()

static gcc_type compile_cplus_convert_qualified ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_reference()

static gcc_type compile_cplus_convert_reference ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_struct_or_union()

static gcc_type compile_cplus_convert_struct_or_union ( compile_cplus_instance * instance,
struct type * type,
enum gcc_cp_symbol_kind nested_access )
static

◆ compile_cplus_convert_struct_or_union_members()

static void compile_cplus_convert_struct_or_union_members ( compile_cplus_instance * instance,
struct type * type,
gcc_type comp_type )
static

◆ compile_cplus_convert_struct_or_union_methods()

static void compile_cplus_convert_struct_or_union_methods ( compile_cplus_instance * instance,
struct type * type,
gcc_type class_type )
static

◆ compile_cplus_convert_type_defns()

static void compile_cplus_convert_type_defns ( compile_cplus_instance * instance,
struct type * type )
static

◆ compile_cplus_convert_typedef()

static gcc_type compile_cplus_convert_typedef ( compile_cplus_instance * instance,
struct type * type,
enum gcc_cp_symbol_kind nested_access )
static

◆ compile_cplus_convert_void()

static gcc_type compile_cplus_convert_void ( compile_cplus_instance * instance,
struct type * type )
static

Definition at line 1032 of file compile-cplus-types.c.

References compile_cplus_instance::plugin().

Referenced by convert_type_cplus_basic().

◆ compile_cplus_debug_output() [1/2]

static void compile_cplus_debug_output ( )
static

Definition at line 1251 of file compile-cplus-types.c.

Referenced by compile_cplus_debug_output().

◆ compile_cplus_debug_output() [2/2]

template<typename T , typename... Targs>
static void compile_cplus_debug_output ( T arg,
Targs... Args )
static

◆ compile_cplus_debug_output_1() [1/3]

static void compile_cplus_debug_output_1 ( const char * arg)
static

Definition at line 1242 of file compile-cplus-types.c.

References gdb_puts(), and gdb_stdlog.

◆ compile_cplus_debug_output_1() [2/3]

template<typename T >
static void compile_cplus_debug_output_1 ( const T * arg)
static

Definition at line 1257 of file compile-cplus-types.c.

◆ compile_cplus_debug_output_1() [3/3]

static void compile_cplus_debug_output_1 ( ULONGEST arg)
static

Definition at line 1236 of file compile-cplus-types.c.

References gdb_printf(), and gdb_stdlog.

Referenced by compile_cplus_debug_output().

◆ convert_type_cplus_basic()

static gcc_type convert_type_cplus_basic ( compile_cplus_instance * instance,
struct type * type,
enum gcc_cp_symbol_kind nested_access )
static

◆ get_field_access_flag()

static enum gcc_cp_symbol_kind get_field_access_flag ( const struct type * type,
int num )
static

◆ get_method_access_flag()

enum gcc_cp_symbol_kind get_method_access_flag ( const struct type * type,
int fni,
int num )

◆ operator!=() [1/2]

bool operator!= ( const compile_scope & lhs,
const compile_scope & rhs )

Definition at line 230 of file compile-cplus-types.c.

◆ operator!=() [2/2]

bool operator!= ( const scope_component & lhs,
const scope_component & rhs )

Definition at line 202 of file compile-cplus-types.c.

References scope_component::name.

◆ operator==() [1/2]

bool operator== ( const compile_scope & lhs,
const compile_scope & rhs )

Definition at line 211 of file compile-cplus-types.c.

◆ operator==() [2/2]

bool operator== ( const scope_component & lhs,
const scope_component & rhs )

Definition at line 193 of file compile-cplus-types.c.

References scope_component::name.

◆ type_name_to_scope()

compile_scope type_name_to_scope ( const char * type_name,
const struct block * block )

Variable Documentation

◆ debug_compile_cplus_scopes

bool debug_compile_cplus_scopes = false
static

◆ debug_compile_cplus_types

bool debug_compile_cplus_types = false
static