summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/rld-dwarf.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2020-09-15 13:10:56 +1000
committerChris Johns <chrisj@rtems.org>2020-09-15 13:10:56 +1000
commit463831374ce73e6792c6fc6c02e705cf3b8fc349 (patch)
tree783cd45ad8e2f3f403dbc41e574641b95559e951 /rtemstoolkit/rld-dwarf.h
parentlinkers/exeinfo: Output TLS data (diff)
downloadrtems-tools-463831374ce73e6792c6fc6c02e705cf3b8fc349.tar.bz2
linker/exeinfo: Optionally output full flags when listing object files
- Start adding support to dump configuration tables
Diffstat (limited to 'rtemstoolkit/rld-dwarf.h')
-rw-r--r--rtemstoolkit/rld-dwarf.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/rtemstoolkit/rld-dwarf.h b/rtemstoolkit/rld-dwarf.h
index 030be3a..45fbab1 100644
--- a/rtemstoolkit/rld-dwarf.h
+++ b/rtemstoolkit/rld-dwarf.h
@@ -277,6 +277,59 @@ namespace rld
};
/**
+ * Variable.
+ */
+ class variable
+ {
+ public:
+
+ variable (file& debug, debug_info_entry& die);
+ variable (const variable& orig);
+ ~variable ();
+
+ /**
+ * Get the name of the variable.
+ */
+ std::string name () const;
+
+ /**
+ * Is the variable external?
+ */
+ bool is_external () const;
+
+ /**
+ * Is this just a declaration?
+ */
+ bool is_declaration () const;
+
+ /**
+ * Size of the variable.
+ */
+ size_t size () const;
+
+ /**
+ * Assigment operator.
+ */
+ variable& operator = (const variable& rhs);
+
+ /**
+ * Dump the variable.
+ */
+ void dump (std::ostream& out) const;
+
+ private:
+
+ file& debug;
+ bool external_;
+ bool declaration_;
+ std::string name_;
+ std::string decl_file_;
+ dwarf_unsigned decl_line_;
+ };
+
+ typedef std::vector < variable > variables;
+
+ /**
* Function.
*/
class function
@@ -620,6 +673,11 @@ namespace rld
void load_types ();
/**
+ * Load the variables.
+ */
+ void load_variables ();
+
+ /**
* Load the functions.
*/
void load_functions ();
@@ -677,6 +735,7 @@ namespace rld
private:
+ void load_variables (debug_info_entry& die);
void load_functions (debug_info_entry& die);
file& debug; ///< The DWARF debug handle.
@@ -781,6 +840,11 @@ namespace rld
void load_functions ();
/**
+ * Load the DWARF variables information.
+ */
+ void load_variables ();
+
+ /**
* Get the source location given an address.
*/
bool get_source (const unsigned int address,
@@ -793,6 +857,11 @@ namespace rld
void get_producer_sources (producer_sources& producers);
/**
+ * Get the variable given a name. Raises an exception if not found.
+ */
+ variable& get_variable (std::string& name);
+
+ /**
* Does the function exist.
*/
bool function_valid (std::string&name);