GDB (xrefs)
Classes | Macros | Functions
compile-loc2c.c File Reference
#include "defs.h"
#include "dwarf2.h"
#include "dwarf2expr.h"
#include "dwarf2loc.h"
#include "ui-file.h"
#include "utils.h"
#include "compile-internal.h"
#include "compile.h"
#include "block.h"
#include "dwarf2-frame.h"
#include "gdb_vecs.h"
#include "value.h"

Go to the source code of this file.

Classes

struct  insn_info
 

Macros

#define SET_CHECK_DEPTH(WHERE)
 
#define GCC_UINTPTR   "__gdb_uintptr"
 
#define GCC_INTPTR   "__gdb_intptr"
 
#define BINARY(OP)
 
#define COMPARE(OP)
 

Functions

static void compute_stack_depth_worker (int start, int *need_tempvar, struct insn_info *info, VEC(int)**to_do, enum bfd_endian byte_order, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end)
 
static int compute_stack_depth (enum bfd_endian byte_order, unsigned int addr_size, int *need_tempvar, int *is_tls, const gdb_byte *op_ptr, const gdb_byte *op_end, int initial_depth, struct insn_info **info)
 
static void push (int indent, struct ui_file *stream, ULONGEST l)
 
static void pushf (int indent, struct ui_file *stream, const char *format,...) ATTRIBUTE_PRINTF(3
 
static void unary (int indent, struct ui_file *stream, const char *format,...) ATTRIBUTE_PRINTF(3
 
static void binary (int indent, struct ui_file *stream, const char *format,...) ATTRIBUTE_PRINTF(3
 
static void print_label (struct ui_file *stream, unsigned int scope, int target)
 
static void pushf_register_address (int indent, struct ui_file *stream, unsigned char *registers_used, struct gdbarch *gdbarch, int regnum)
 
static void pushf_register (int indent, struct ui_file *stream, unsigned char *registers_used, struct gdbarch *gdbarch, int regnum, uint64_t offset)
 
static void do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream, const char *type_name, const char *result_name, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, unsigned char *registers_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, CORE_ADDR *initial, struct dwarf2_per_cu_data *per_cu)
 
void compile_dwarf_expr_to_c (struct ui_file *stream, const char *result_name, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, unsigned char *registers_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, struct dwarf2_per_cu_data *per_cu)
 
void compile_dwarf_bounds_to_c (struct ui_file *stream, const char *result_name, const struct dynamic_prop *prop, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, unsigned char *registers_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, struct dwarf2_per_cu_data *per_cu)
 

Macro Definition Documentation

#define BINARY (   OP)
Value:
binary (indent, stream, "%s", "__gdb_stack[__gdb_tos-1] " #OP \
" __gdb_stack[__gdb_tos]"); \
break
static void binary(int indent, struct ui_file *stream, const char *format,...) ATTRIBUTE_PRINTF(3
Definition: expression.h:74

Referenced by do_compile_dwarf_expr_to_c().

#define COMPARE (   OP)
Value:
binary (indent, stream, \
"(((" GCC_INTPTR ") __gdb_stack[__gdb_tos-1]) " #OP \
" ((" GCC_INTPTR \
") __gdb_stack[__gdb_tos]))"); \
break
static void binary(int indent, struct ui_file *stream, const char *format,...) ATTRIBUTE_PRINTF(3
Definition: expression.h:74
#define GCC_INTPTR

Referenced by do_compile_dwarf_expr_to_c().

#define GCC_INTPTR   "__gdb_intptr"

Definition at line 432 of file compile-loc2c.c.

Referenced by do_compile_dwarf_expr_to_c().

#define GCC_UINTPTR   "__gdb_uintptr"
#define SET_CHECK_DEPTH (   WHERE)
Value:
if (info[WHERE].visited) \
{ \
if (info[WHERE].depth != stack_depth) \
error (_("inconsistent stack depths")); \
} \
else \
{ \
/* Stack depth not set, so set it. */ \
info[WHERE].visited = 1; \
info[WHERE].depth = stack_depth; \
}
if(!(yy_init))
Definition: ada-lex.c:1072
#define _(String)
Definition: gdb_locale.h:40

Referenced by compute_stack_depth_worker().

Function Documentation

static void static void binary ( int  indent,
struct ui_file stream,
const char *  format,
  ... 
)
static

Definition at line 488 of file compile-loc2c.c.

References fprintf_filtered(), fprintfi_filtered(), and vfprintf_filtered().

Referenced by do_compile_dwarf_expr_to_c().

void compile_dwarf_bounds_to_c ( struct ui_file stream,
const char *  result_name,
const struct dynamic_prop prop,
struct symbol sym,
CORE_ADDR  pc,
struct gdbarch arch,
unsigned char *  registers_used,
unsigned int  addr_size,
const gdb_byte op_ptr,
const gdb_byte op_end,
struct dwarf2_per_cu_data per_cu 
)

Definition at line 1149 of file compile-loc2c.c.

References do_compile_dwarf_expr_to_c().

Referenced by dwarf2_compile_property_to_c().

void compile_dwarf_expr_to_c ( struct ui_file stream,
const char *  result_name,
struct symbol sym,
CORE_ADDR  pc,
struct gdbarch arch,
unsigned char *  registers_used,
unsigned int  addr_size,
const gdb_byte op_ptr,
const gdb_byte op_end,
struct dwarf2_per_cu_data per_cu 
)
static int compute_stack_depth ( enum bfd_endian  byte_order,
unsigned int  addr_size,
int need_tempvar,
int is_tls,
const gdb_byte op_ptr,
const gdb_byte op_end,
int  initial_depth,
struct insn_info **  info 
)
static
static void compute_stack_depth_worker ( int  start,
int need_tempvar,
struct insn_info info,
VEC(int)**  to_do,
enum bfd_endian  byte_order,
unsigned int  addr_size,
const gdb_byte op_ptr,
const gdb_byte op_end 
)
static
static void do_compile_dwarf_expr_to_c ( int  indent,
struct ui_file stream,
const char *  type_name,
const char *  result_name,
struct symbol sym,
CORE_ADDR  pc,
struct gdbarch arch,
unsigned char *  registers_used,
unsigned int  addr_size,
const gdb_byte op_ptr,
const gdb_byte op_end,
CORE_ADDR initial,
struct dwarf2_per_cu_data per_cu 
)
static
static void print_label ( struct ui_file stream,
unsigned int  scope,
int  target 
)
static

Definition at line 505 of file compile-loc2c.c.

References fprintf_filtered(), and pulongest().

Referenced by do_compile_dwarf_expr_to_c().

static void push ( int  indent,
struct ui_file stream,
ULONGEST  l 
)
static

Definition at line 437 of file compile-loc2c.c.

References fprintfi_filtered(), GCC_UINTPTR, and hex_string().

Referenced by do_compile_dwarf_expr_to_c().

static void static void pushf ( int  indent,
struct ui_file stream,
const char *  format,
  ... 
)
static
static void pushf_register ( int  indent,
struct ui_file stream,
unsigned char *  registers_used,
struct gdbarch gdbarch,
int  regnum,
uint64_t  offset 
)
static
static void pushf_register_address ( int  indent,
struct ui_file stream,
unsigned char *  registers_used,
struct gdbarch gdbarch,
int  regnum 
)
static
static void static void unary ( int  indent,
struct ui_file stream,
const char *  format,
  ... 
)
static

Definition at line 471 of file compile-loc2c.c.

References fprintf_filtered(), fprintfi_filtered(), and vfprintf_filtered().

Referenced by do_compile_dwarf_expr_to_c().