start_pc_sal = find_pc_sect_line (start_pc, NULL, 0);
if (start_pc_sal.symtab == NULL
- || producer_is_gcc_ge_4 (COMPUNIT_PRODUCER
- (SYMTAB_COMPUNIT (start_pc_sal.symtab))) < 6
+ || producer_is_gcc_ge_4 (SYMTAB_COMPUNIT
+ (start_pc_sal.symtab)->producer ()) < 6
|| start_pc_sal.pc != start_pc || pc >= start_pc_sal.end)
return pc;
compilers to emit usable line notes. */
if (post_prologue_pc
&& (cust != NULL
- && COMPUNIT_PRODUCER (cust) != NULL
- && (producer_is_llvm (COMPUNIT_PRODUCER (cust))
- || producer_is_icc_ge_19 (COMPUNIT_PRODUCER (cust)))))
+ && cust->producer () != nullptr
+ && (producer_is_llvm (cust->producer ())
+ || producer_is_icc_ge_19 (cust->producer ()))))
return std::max (start_pc, post_prologue_pc);
}
missing (e.g. for -gstabs), assuming the GNU tools. */
if (post_prologue_pc
&& (cust == NULL
- || COMPUNIT_PRODUCER (cust) == NULL
- || startswith (COMPUNIT_PRODUCER (cust), "GNU ")
- || producer_is_llvm (COMPUNIT_PRODUCER (cust))))
+ || cust->producer () == NULL
+ || startswith (cust->producer (), "GNU ")
+ || producer_is_llvm (cust->producer ())))
return post_prologue_pc;
if (post_prologue_pc != 0)
cu->set_debugformat (m_debugformat);
/* Similarly for the producer. */
- COMPUNIT_PRODUCER (cu) = m_producer;
+ cu->set_producer (m_producer);
COMPUNIT_BLOCKVECTOR (cu) = blockvector;
{
struct compunit_symtab *symtab = find_pc_compunit_symtab (pc);
const char *cs;
- if (symtab == NULL || symtab->producer == NULL
- || !startswith (symtab->producer, "GNU "))
+ if (symtab == NULL || symtab->producer () == NULL
+ || !startswith (symtab->producer (), "GNU "))
return NULL;
- cs = symtab->producer;
+ cs = symtab->producer ();
while (*cs != 0 && *cs != '-')
cs = skip_spaces (skip_to_space (cs));
if (*cs != '-')
if (cust == NULL)
return;
- if (producer_is_realview (COMPUNIT_PRODUCER (cust)))
+ if (producer_is_realview (cust->producer ()))
{
if (fde->cie->version == 1)
fs->armcc_cfa_offsets_sf = 1;
compilers to emit usable line notes. */
if (post_prologue_pc
&& (cust != NULL
- && COMPUNIT_PRODUCER (cust) != NULL
- && (producer_is_llvm (COMPUNIT_PRODUCER (cust))
- || producer_is_icc_ge_19 (COMPUNIT_PRODUCER (cust)))))
+ && cust->producer () != NULL
+ && (producer_is_llvm (cust->producer ())
+ || producer_is_icc_ge_19 (cust->producer ()))))
return std::max (start_pc, post_prologue_pc);
}
STPY_REQUIRE_VALID (self, symtab);
cust = SYMTAB_COMPUNIT (symtab);
- if (COMPUNIT_PRODUCER (cust) != NULL)
+ if (cust->producer () != nullptr)
{
- const char *producer = COMPUNIT_PRODUCER (cust);
+ const char *producer = cust->producer ();
return host_string_to_python_string (producer).release ();
}
printf_filtered (_("Source language is %s.\n"), language_str (s->language));
printf_filtered (_("Producer is %s.\n"),
- COMPUNIT_PRODUCER (cust) != NULL
- ? COMPUNIT_PRODUCER (cust) : _("unknown"));
+ (cust->producer ()) != nullptr
+ ? cust->producer () : _("unknown"));
printf_filtered (_("Compiled with %s debugging format.\n"),
cust->debugformat ());
printf_filtered (_("%s preprocessor macro info.\n"),
printf_filtered (" debugformat %s\n",
cust->debugformat ());
printf_filtered (" producer %s\n",
- COMPUNIT_PRODUCER (cust) != NULL
- ? COMPUNIT_PRODUCER (cust)
- : "(null)");
+ (cust->producer () != nullptr
+ ? cust->producer () : "(null)"));
printf_filtered (" dirname %s\n",
COMPUNIT_DIRNAME (cust) != NULL
? COMPUNIT_DIRNAME (cust)
m_debugformat = debugformat;
}
+ const char *producer () const
+ {
+ return m_producer;
+ }
+
+ void set_producer (const char *producer)
+ {
+ m_producer = producer;
+ }
+
/* Make PRIMARY_FILETAB the primary filetab of this compunit symtab.
PRIMARY_FILETAB must already be a filetab of this compunit symtab. */
const char *m_debugformat;
/* String of producer version information, or NULL if we don't know. */
- const char *producer;
+ const char *m_producer;
/* Directory in which it was compiled, or NULL if we don't know. */
const char *dirname;
using compunit_symtab_range = next_range<compunit_symtab>;
-#define COMPUNIT_PRODUCER(cust) ((cust)->producer)
#define COMPUNIT_DIRNAME(cust) ((cust)->dirname)
#define COMPUNIT_BLOCKVECTOR(cust) ((cust)->blockvector)
#define COMPUNIT_BLOCK_LINE_SECTION(cust) ((cust)->block_line_section)