Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
debuginfo_xml.c File Reference
#include "debuginfo_xml.h"
#include <string.h>
#include "util.h"
#include "glib_wrapper.h"
Include dependency graph for debuginfo_xml.c:

Go to the source code of this file.

Macros

#define FILL_SYMBOLHEADER(s, r, reft, refv)
 
#define FILL_SYMBOLCOMMON(typename, s, r)
 
#define FILL_SYMBOLCOMMON_NOSEQ(typename, s, r)
 
#define FILL_SYMBOLTYPE(typename, s, r)
 
#define FILL_INSTANCESYMBOLCONTENTS(typename, s, opts, reftab, refstack, depth, r)
 
#define REF_ALLOC_SEQ(typename, r, rs)
 
#define REF_ALLOC_SEQ_NOSET(typename, r)
 
#define CLEANUP_REF(objtype, typename, s, opts, reftab, refstack, depth, r)
 
#define RETURN_REF_OR_ALLOC(objtype, typename, s, reft, refv, opts, reftab, refstack, depth, r)
 
#define FILL_MEMBERS(s, rs, soap, opts, reftab, refstack, depth)
 

Functions

struct vmi1__LocationT * d_location_to_x_LocationT (struct soap *soap, struct location *l, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__RangesT * d_range_to_x_RangesT (struct soap *soap, struct range *r, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__VariableT * d_symbol_to_x_VariableT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__FunctionT * d_symbol_to_x_FunctionT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__LabelT * d_symbol_to_x_LabelT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__BlockT * d_symbol_to_x_BlockT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__RootT * d_symbol_to_x_RootT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__VoidTypeT * d_symbol_to_x_VoidTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__BaseTypeT * d_symbol_to_x_BaseTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__PointerTypeT * d_symbol_to_x_PointerTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__RefTypeT * d_symbol_to_x_RefTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__TypedefTypeT * d_symbol_to_x_TypedefTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__ConstTypeT * d_symbol_to_x_ConstTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__VolatileTypeT * d_symbol_to_x_VolatileTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__ArrayTypeT * d_symbol_to_x_ArrayTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__EnumTypeT * d_symbol_to_x_EnumTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__StructTypeT * d_symbol_to_x_StructTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__ClassTypeT * d_symbol_to_x_ClassTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__NamespaceTypeT * d_symbol_to_x_NamespaceTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__TemplateTypeT * d_symbol_to_x_TemplateTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__UnionTypeT * d_symbol_to_x_UnionTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__FunctionTypeT * d_symbol_to_x_FunctionTypeT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__SymbolT * d_symbol_to_x_SymbolT (struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__SymbolsT * d_symbol_array_list_to_x_SymbolsT (struct soap *soap, struct array_list *list, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__SymbolsT * d_symbol_gslist_to_x_SymbolsT (struct soap *soap, GSList *list, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__SymbolsOptT * d_symbol_array_list_to_x_SymbolsOptT (struct soap *soap, struct array_list *list, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__SymbolsOptT * d_symbol_gslist_to_x_SymbolsOptT (struct soap *soap, GSList *list, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__DebugFileT * d_debugfile_to_x_DebugFileT (struct soap *soap, struct debugfile *df, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
 
struct vmi1__ScopeT * d_scope_to_x_ScopeT (struct soap *soap, struct scope *st, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth, struct vmi1__ScopeT *ir)
 

Macro Definition Documentation

#define CLEANUP_REF (   objtype,
  typename,
  s,
  opts,
  reftab,
  refstack,
  depth,
 
)
Value:
if (reftab) \
array_list_remove(refstack);

Definition at line 338 of file debuginfo_xml.c.

#define FILL_INSTANCESYMBOLCONTENTS (   typename,
  s,
  opts,
  reftab,
  refstack,
  depth,
 
)

Definition at line 286 of file debuginfo_xml.c.

#define FILL_MEMBERS (   s,
  rs,
  soap,
  opts,
  reftab,
  refstack,
  depth 
)
Value:
do { \
GSList *_members = SYMBOLX_MEMBERS(s); \
\
if (_members) { \
rs->memberCount = (int)(uintptr_t)g_slist_length(_members); \
rs->members = \
d_symbol_gslist_to_x_SymbolsOptT(soap,_members,opts,reftab, \
refstack,(depth)+1); \
} \
else { \
rs->memberCount = 0; \
rs->members = NULL; \
} \
} while (0);
#define SYMBOLX_MEMBERS(sym)
struct vmi1__SymbolsOptT * d_symbol_gslist_to_x_SymbolsOptT(struct soap *soap, GSList *list, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)
struct dt_argp_state opts
Definition: dumptarget.c:111

Definition at line 939 of file debuginfo_xml.c.

#define FILL_SYMBOLCOMMON (   typename,
  s,
 
)

Definition at line 201 of file debuginfo_xml.c.

#define FILL_SYMBOLCOMMON_NOSEQ (   typename,
  s,
 
)

Definition at line 242 of file debuginfo_xml.c.

#define FILL_SYMBOLHEADER (   s,
  r,
  reft,
  refv 
)
Value:
do { \
int _rc; \
char *_name; \
char _idbuf[20]; \
int _idblen = 20; \
\
_rc = snprintf(_idbuf,_idblen,"%s%d",reft,refv); \
_rc = (_rc > _idblen) ? _idblen : (_rc + 1); \
(r)->sid = _soap_calloc(soap,_rc); \
strncpy((r)->sid,_idbuf,_rc); \
if (symbol_get_name(s)) { \
_name = symbol_get_name((s)); \
_rc = strlen(_name) + 1; \
(r)->name = _soap_calloc(soap,_rc); \
strncpy((r)->name,_name,_rc); \
} \
} while (0);
char * symbol_get_name(struct symbol *symbol)
Definition: debug.c:2587

Definition at line 182 of file debuginfo_xml.c.

#define FILL_SYMBOLTYPE (   typename,
  s,
 
)
Value:
if ((s)->datatype) \
(r)->__ ## typename ## _sequence->symtype = \
d_symbol_to_x_SymbolT(soap,(s)->datatype,(opts), \
(reftab),(refstack),(depth)+1);
struct dt_argp_state opts
Definition: dumptarget.c:111
struct vmi1__SymbolT * d_symbol_to_x_SymbolT(struct soap *soap, struct symbol *s, struct vmi1__DebugFileOptsT *opts, GHashTable *reftab, struct array_list *refstack, int depth)

Definition at line 280 of file debuginfo_xml.c.

#define REF_ALLOC_SEQ (   typename,
  r,
  rs 
)
Value:
if (!(r)->__ ## typename ## _sequence) { \
(r)->__size_ ## typename ## _sequence = 1; \
(r)->__ ## typename ## _sequence = \
_soap_calloc(soap,sizeof(*(r)->__ ## typename ## _sequence)); \
} \
rs = (r)->__ ## typename ## _sequence;

Definition at line 323 of file debuginfo_xml.c.

#define REF_ALLOC_SEQ_NOSET (   typename,
 
)
Value:
if (!(r)->__ ## typename ## _sequence) { \
(r)->__size_ ## typename ## _sequence = 1; \
(r)->__ ## typename ## _sequence = \
_soap_calloc(soap,sizeof(*(r)->__ ## typename ## _sequence)); \
}

Definition at line 331 of file debuginfo_xml.c.

#define RETURN_REF_OR_ALLOC (   objtype,
  typename,
  s,
  reft,
  refv,
  opts,
  reftab,
  refstack,
  depth,
 
)

Definition at line 345 of file debuginfo_xml.c.

Function Documentation

struct vmi1__DebugFileT* d_debugfile_to_x_DebugFileT ( struct soap *  soap,
struct debugfile df,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1581 of file debuginfo_xml.c.

struct vmi1__LocationT* d_location_to_x_LocationT ( struct soap *  soap,
struct location l,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 42 of file debuginfo_xml.c.

struct vmi1__RangesT* d_range_to_x_RangesT ( struct soap *  soap,
struct range r,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 143 of file debuginfo_xml.c.

struct vmi1__ScopeT* d_scope_to_x_ScopeT ( struct soap *  soap,
struct scope st,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth,
struct vmi1__ScopeT *  ir 
)

Definition at line 1658 of file debuginfo_xml.c.

struct vmi1__SymbolsOptT* d_symbol_array_list_to_x_SymbolsOptT ( struct soap *  soap,
struct array_list list,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1547 of file debuginfo_xml.c.

struct vmi1__SymbolsT* d_symbol_array_list_to_x_SymbolsT ( struct soap *  soap,
struct array_list list,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1253 of file debuginfo_xml.c.

struct vmi1__SymbolsOptT* d_symbol_gslist_to_x_SymbolsOptT ( struct soap *  soap,
GSList *  list,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1564 of file debuginfo_xml.c.

struct vmi1__SymbolsT* d_symbol_gslist_to_x_SymbolsT ( struct soap *  soap,
GSList *  list,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1399 of file debuginfo_xml.c.

struct vmi1__ArrayTypeT* d_symbol_to_x_ArrayTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 898 of file debuginfo_xml.c.

struct vmi1__BaseTypeT* d_symbol_to_x_BaseTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 720 of file debuginfo_xml.c.

struct vmi1__BlockT* d_symbol_to_x_BlockT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 633 of file debuginfo_xml.c.

struct vmi1__ClassTypeT* d_symbol_to_x_ClassTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1004 of file debuginfo_xml.c.

struct vmi1__ConstTypeT* d_symbol_to_x_ConstTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 855 of file debuginfo_xml.c.

struct vmi1__EnumTypeT* d_symbol_to_x_EnumTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 956 of file debuginfo_xml.c.

struct vmi1__FunctionT* d_symbol_to_x_FunctionT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 547 of file debuginfo_xml.c.

struct vmi1__FunctionTypeT* d_symbol_to_x_FunctionTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1100 of file debuginfo_xml.c.

struct vmi1__LabelT* d_symbol_to_x_LabelT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 612 of file debuginfo_xml.c.

struct vmi1__NamespaceTypeT* d_symbol_to_x_NamespaceTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1028 of file debuginfo_xml.c.

struct vmi1__PointerTypeT* d_symbol_to_x_PointerTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 791 of file debuginfo_xml.c.

struct vmi1__RefTypeT* d_symbol_to_x_RefTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 812 of file debuginfo_xml.c.

struct vmi1__RootT* d_symbol_to_x_RootT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 662 of file debuginfo_xml.c.

struct vmi1__StructTypeT* d_symbol_to_x_StructTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 980 of file debuginfo_xml.c.

struct vmi1__SymbolT* d_symbol_to_x_SymbolT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1141 of file debuginfo_xml.c.

struct vmi1__TemplateTypeT* d_symbol_to_x_TemplateTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1052 of file debuginfo_xml.c.

struct vmi1__TypedefTypeT* d_symbol_to_x_TypedefTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 833 of file debuginfo_xml.c.

struct vmi1__UnionTypeT* d_symbol_to_x_UnionTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 1076 of file debuginfo_xml.c.

struct vmi1__VariableT* d_symbol_to_x_VariableT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 503 of file debuginfo_xml.c.

struct vmi1__VoidTypeT* d_symbol_to_x_VoidTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 697 of file debuginfo_xml.c.

struct vmi1__VolatileTypeT* d_symbol_to_x_VolatileTypeT ( struct soap *  soap,
struct symbol s,
struct vmi1__DebugFileOptsT *  opts,
GHashTable *  reftab,
struct array_list refstack,
int  depth 
)

Definition at line 876 of file debuginfo_xml.c.