}
/* Save the debug format string (if any) in the symtab. */
- COMPUNIT_DEBUGFORMAT (cu) = m_debugformat;
+ cu->set_debugformat (m_debugformat);
/* Similarly for the producer. */
COMPUNIT_PRODUCER (cu) = m_producer;
BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
COMPUNIT_BLOCKVECTOR (cust) = bv;
- COMPUNIT_DEBUGFORMAT (cust) = "ECOFF";
+ cust->set_debugformat ("ECOFF");
return cust;
}
struct symtab_and_line prologue_sal = find_pc_line (start_pc, 0);
struct compunit_symtab *compunit
= SYMTAB_COMPUNIT (prologue_sal.symtab);
- const char *debug_format = COMPUNIT_DEBUGFORMAT (compunit);
+ const char *debug_format = compunit->debugformat ();
if ((NULL != debug_format)
&& (strlen ("dwarf") <= strlen (debug_format))
COMPUNIT_PRODUCER (cust) != NULL
? COMPUNIT_PRODUCER (cust) : _("unknown"));
printf_filtered (_("Compiled with %s debugging format.\n"),
- COMPUNIT_DEBUGFORMAT (cust));
+ cust->debugformat ());
printf_filtered (_("%s preprocessor macro info.\n"),
COMPUNIT_MACRO_TABLE (cust) != NULL
? "Includes" : "Does not include");
saved_name = lbasename (name);
cu->name = obstack_strdup (&objfile->objfile_obstack, saved_name);
- COMPUNIT_DEBUGFORMAT (cu) = "unknown";
+ cu->set_debugformat ("unknown");
if (symtab_create_debug)
{
printf_filtered (" { ((struct compunit_symtab *) %s)\n",
host_address_to_string (cust));
printf_filtered (" debugformat %s\n",
- COMPUNIT_DEBUGFORMAT (cust));
+ cust->debugformat ());
printf_filtered (" producer %s\n",
COMPUNIT_PRODUCER (cust) != NULL
? COMPUNIT_PRODUCER (cust)
}
}
+ const char *debugformat () const
+ {
+ return m_debugformat;
+ }
+
+ void set_debugformat (const char *debugformat)
+ {
+ m_debugformat = debugformat;
+ }
+
/* Make PRIMARY_FILETAB the primary filetab of this compunit symtab.
PRIMARY_FILETAB must already be a filetab of this compunit symtab. */
such as "stabs", "dwarf 1", "dwarf 2", "coff", etc. This is mostly useful
for automated testing of gdb but may also be information that is
useful to the user. */
- const char *debugformat;
+ const char *m_debugformat;
/* String of producer version information, or NULL if we don't know. */
const char *producer;
using compunit_symtab_range = next_range<compunit_symtab>;
-#define COMPUNIT_DEBUGFORMAT(cust) ((cust)->debugformat)
#define COMPUNIT_PRODUCER(cust) ((cust)->producer)
#define COMPUNIT_DIRNAME(cust) ((cust)->dirname)
#define COMPUNIT_BLOCKVECTOR(cust) ((cust)->blockvector)
{
struct symtab_and_line prologue_sal = find_pc_line (func_addr, 0);
struct compunit_symtab *compunit = SYMTAB_COMPUNIT (prologue_sal.symtab);
- const char *debug_format = COMPUNIT_DEBUGFORMAT (compunit);
+ const char *debug_format = compunit->debugformat ();
if (debug_format != NULL &&
!strncasecmp ("dwarf", debug_format, strlen("dwarf")))