this module. */
static bool solib_aix_debug;
+/* Print an "aix-solib" debug statement. */
+
+#define solib_aix_debug_printf(fmt, ...) \
+ debug_prefixed_printf_cond (solib_aix_debug, "aix-solib",fmt, ##__VA_ARGS__)
+
/* Our private data in struct so_list. */
struct lm_info_aix : public lm_info_base
return data->library_list;
}
- if (solib_aix_debug)
- fprintf_unfiltered (gdb_stdlog,
- "DEBUG: TARGET_OBJECT_LIBRARIES_AIX = \n%s\n",
- library_document->data ());
+ solib_aix_debug_printf ("TARGET_OBJECT_LIBRARIES_AIX = %s",
+ library_document->data ());
data->library_list = solib_aix_parse_libraries (library_document->data ());
if (!data->library_list.has_value () && warning_msg != NULL)
{
lm_info_aix *li = (lm_info_aix *) so->lm_info;
- if (solib_aix_debug)
- fprintf_unfiltered (gdb_stdlog, "DEBUG: solib_aix_free_so (%s)\n",
- so->so_name);
+ solib_aix_debug_printf ("%s", so->so_name);
delete li;
}
result = (obj_section_addr (data_osect)
+ xcoff_get_toc_offset (pc_osect->objfile));
- if (solib_aix_debug)
- fprintf_unfiltered (gdb_stdlog,
- "DEBUG: solib_aix_get_toc_value (pc=%s) -> %s\n",
- core_addr_to_string (pc),
- core_addr_to_string (result));
+
+ solib_aix_debug_printf ("pc=%s -> %s", core_addr_to_string (pc),
+ core_addr_to_string (result));
return result;
}