GDB (xrefs)
Macros | Functions
compile-c-support.c File Reference
#include "defs.h"
#include "compile-internal.h"
#include "compile.h"
#include "gdb-dlfcn.h"
#include "c-lang.h"
#include "macrotab.h"
#include "macroscope.h"
#include "regcache.h"

Go to the source code of this file.

Macros

#define STR(x)   #x
 
#define STRINGIFY(x)   STR(x)
 

Functions

const char * c_get_mode_for_size (int size)
 
char * c_get_range_decl_name (const struct dynamic_prop *prop)
 
static gcc_c_fe_context_function * load_libcc (void)
 
struct compile_instancec_get_compile_context (void)
 
static void print_one_macro (const char *name, const struct macro_definition *macro, struct macro_source_file *source, int line, void *user_data)
 
static void write_macro_definitions (const struct block *block, CORE_ADDR pc, struct ui_file *file)
 
static void add_code_header (enum compile_i_scope_types type, struct ui_file *buf)
 
static void add_code_footer (enum compile_i_scope_types type, struct ui_file *buf)
 
static void generate_register_struct (struct ui_file *stream, struct gdbarch *gdbarch, const unsigned char *registers_used)
 
char * c_compute_program (struct compile_instance *inst, const char *input, struct gdbarch *gdbarch, const struct block *expr_block, CORE_ADDR expr_pc)
 

Macro Definition Documentation

#define STR (   x)    #x

Definition at line 67 of file compile-c-support.c.

#define STRINGIFY (   x)    STR(x)

Definition at line 68 of file compile-c-support.c.

Referenced by load_libcc().

Function Documentation

static void add_code_footer ( enum compile_i_scope_types  type,
struct ui_file buf 
)
static
static void add_code_header ( enum compile_i_scope_types  type,
struct ui_file buf 
)
static
char* c_compute_program ( struct compile_instance inst,
const char *  input,
struct gdbarch gdbarch,
const struct block expr_block,
CORE_ADDR  expr_pc 
)
struct compile_instance* c_get_compile_context ( void  )

Definition at line 98 of file compile-c-support.c.

References _, error(), func, gdb_assert, load_libcc(), and new_compile_instance().

const char* c_get_mode_for_size ( int  size)

Definition at line 32 of file compile-c-support.c.

References _, and internal_error().

Referenced by c_compute_program(), do_compile_dwarf_expr_to_c(), and generate_register_struct().

char* c_get_range_decl_name ( const struct dynamic_prop prop)

Definition at line 60 of file compile-c-support.c.

References host_address_to_string(), and xstrprintf().

Referenced by convert_array(), and generate_vla_size().

static void generate_register_struct ( struct ui_file stream,
struct gdbarch gdbarch,
const unsigned char *  registers_used 
)
static
static gcc_c_fe_context_function* load_libcc ( void  )
static

Definition at line 75 of file compile-c-support.c.

References _, error(), func, gdb_dlopen(), gdb_dlsym(), and STRINGIFY.

Referenced by c_get_compile_context().

static void print_one_macro ( const char *  name,
const struct macro_definition macro,
struct macro_source_file source,
int  line,
void *  user_data 
)
static
static void write_macro_definitions ( const struct block block,
CORE_ADDR  pc,
struct ui_file file 
)
static