Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'agent/tcf/services/symbols.h')
-rw-r--r--agent/tcf/services/symbols.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/agent/tcf/services/symbols.h b/agent/tcf/services/symbols.h
index 884699d2..aca6da0c 100644
--- a/agent/tcf/services/symbols.h
+++ b/agent/tcf/services/symbols.h
@@ -46,6 +46,7 @@ typedef struct Symbol Symbol;
#define TYPE_CLASS_COMPOSITE 6
#define TYPE_CLASS_ENUMERATION 7
#define TYPE_CLASS_FUNCTION 8
+#define TYPE_CLASS_MEMBER_PTR 9
typedef uint32_t SYM_FLAGS;
@@ -75,6 +76,35 @@ typedef uint32_t SYM_FLAGS;
typedef void EnumerateSymbolsCallBack(void *, Symbol *);
+#if ENABLE_DebugContext
+
+typedef struct LocationInfo {
+ ContextAddress addr;
+ ContextAddress size;
+ LocationExpressionCommand * cmds;
+ unsigned cmds_cnt;
+ unsigned cmds_max;
+} LocationInfo;
+
+/* Stack tracing command sequence */
+typedef struct StackFrameRegisterLocation {
+ RegisterDefinition * reg;
+ unsigned cmds_cnt;
+ unsigned cmds_max;
+ LocationExpressionCommand cmds[1];
+} StackFrameRegisterLocation;
+
+/* Complete stack tracing info for a range of instruction addresses */
+typedef struct StackTracingInfo {
+ ContextAddress addr;
+ ContextAddress size;
+ StackFrameRegisterLocation * fp;
+ StackFrameRegisterLocation ** regs;
+ int reg_cnt;
+} StackTracingInfo;
+
+#endif
+
#if ENABLE_Symbols
/*
@@ -119,7 +149,6 @@ extern const char * symbol2id(const Symbol * sym);
*/
extern int id2symbol(const char * id, Symbol ** sym);
-
/*************** Functions for retrieving symbol properties ***************************************/
/*
* Each function retireves one particular attribute of an object or type.
@@ -154,12 +183,16 @@ extern int get_symbol_name(const Symbol * sym, char ** name);
/* Get value size of the type, in bytes */
extern int get_symbol_size(const Symbol * sym, ContextAddress * size);
-/* Get base type ID */
+/* Get base type: pointer or member pointer - pointed object type,
+ * array - elements type, function - result type */
extern int get_symbol_base_type(const Symbol * sym, Symbol ** base_type);
-/* Get array index type ID */
+/* Get array index type */
extern int get_symbol_index_type(const Symbol * sym, Symbol ** index_type);
+/* Get containing type: field (member) or member pointer - parent structure */
+extern int get_symbol_containing_type(const Symbol * sym, Symbol ** containing_type);
+
/* Get array length (number of elements) */
extern int get_symbol_length(const Symbol * sym, ContextAddress * length);
@@ -200,6 +233,9 @@ extern int get_array_symbol(const Symbol * sym, ContextAddress length, Symbol **
*/
extern ContextAddress is_plt_section(Context * ctx, ContextAddress addr);
+/* Get object location expression */
+extern int get_location_info(const Symbol * sym, LocationInfo ** info);
+
/*
* For given context and its registers in a stack frame,
* compute stack frame location and next frame register values.

Back to the top