Remove VAR_DOMAIN/STRUCT_DOMAIN ambiguity from ada-tasks.c.
[deliverable/binutils-gdb.git] / gdb / symtab.h
index 4bf30358e74076a19b2ba72d99dcc9677555ccf1..fbe58689c12d7c7db6225f79791c54edfcf3e3e7 100644 (file)
@@ -391,7 +391,18 @@ struct minimal_symbol
 #define MSYMBOL_TYPE(msymbol)          (msymbol)->type
 
 #define MSYMBOL_VALUE(symbol)          (symbol)->mginfo.value.ivalue
-#define MSYMBOL_VALUE_ADDRESS(symbol)  (symbol)->mginfo.value.address
+/* The unrelocated address of the minimal symbol.  */
+#define MSYMBOL_VALUE_RAW_ADDRESS(symbol) ((symbol)->mginfo.value.address + 0)
+/* The relocated address of the minimal symbol, using the section
+   offsets from OBJFILE.  */
+#define MSYMBOL_VALUE_ADDRESS(objfile, symbol)                         \
+  ((symbol)->mginfo.value.address                                      \
+   + ANOFFSET ((objfile)->section_offsets, ((symbol)->mginfo.section)))
+/* For a bound minsym, we can easily compute the address directly.  */
+#define BMSYMBOL_VALUE_ADDRESS(symbol) \
+  MSYMBOL_VALUE_ADDRESS ((symbol).objfile, (symbol).minsym)
+#define SET_MSYMBOL_VALUE_ADDRESS(symbol, new_value)   \
+  ((symbol)->mginfo.value.address = (new_value))
 #define MSYMBOL_VALUE_BYTES(symbol)    (symbol)->mginfo.value.bytes
 #define MSYMBOL_BLOCK_VALUE(symbol)    (symbol)->mginfo.value.block
 #define MSYMBOL_VALUE_CHAIN(symbol)    (symbol)->mginfo.value.chain
@@ -1210,6 +1221,9 @@ struct symtab_and_line
 
   /* The probe associated with this symtab_and_line.  */
   struct probe *probe;
+  /* If PROBE is not NULL, then this is the objfile in which the probe
+     originated.  */
+  struct objfile *objfile;
 };
 
 extern void init_sal (struct symtab_and_line *sal);
This page took 0.025152 seconds and 4 git commands to generate.