gdb: convert solib-aix to new-style debug macros
This is only compile-tested. gdb/ChangeLog: * solib-aix.c (solib_aix_debug_printf): New, use throughout file. Change-Id: I7ec4baa15ab5b8ad786212b8b9de61c2c447bac1
This commit is contained in:
parent
062eaacbac
commit
eef401dce1
@ -1,3 +1,8 @@
|
|||||||
|
2021-01-11 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* solib-aix.c (solib_aix_debug_printf): New, use throughout
|
||||||
|
file.
|
||||||
|
|
||||||
2021-01-11 Simon Marchi <simon.marchi@polymtl.ca>
|
2021-01-11 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* jit.c (jit_debug): Change type to bool.
|
* jit.c (jit_debug): Change type to bool.
|
||||||
|
@ -32,6 +32,11 @@
|
|||||||
this module. */
|
this module. */
|
||||||
static bool solib_aix_debug;
|
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. */
|
/* Our private data in struct so_list. */
|
||||||
|
|
||||||
struct lm_info_aix : public lm_info_base
|
struct lm_info_aix : public lm_info_base
|
||||||
@ -250,9 +255,7 @@ solib_aix_get_library_list (struct inferior *inf, const char *warning_msg)
|
|||||||
return data->library_list;
|
return data->library_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (solib_aix_debug)
|
solib_aix_debug_printf ("TARGET_OBJECT_LIBRARIES_AIX = %s",
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
|
||||||
"DEBUG: TARGET_OBJECT_LIBRARIES_AIX = \n%s\n",
|
|
||||||
library_document->data ());
|
library_document->data ());
|
||||||
|
|
||||||
data->library_list = solib_aix_parse_libraries (library_document->data ());
|
data->library_list = solib_aix_parse_libraries (library_document->data ());
|
||||||
@ -374,9 +377,7 @@ solib_aix_free_so (struct so_list *so)
|
|||||||
{
|
{
|
||||||
lm_info_aix *li = (lm_info_aix *) so->lm_info;
|
lm_info_aix *li = (lm_info_aix *) so->lm_info;
|
||||||
|
|
||||||
if (solib_aix_debug)
|
solib_aix_debug_printf ("%s", so->so_name);
|
||||||
fprintf_unfiltered (gdb_stdlog, "DEBUG: solib_aix_free_so (%s)\n",
|
|
||||||
so->so_name);
|
|
||||||
|
|
||||||
delete li;
|
delete li;
|
||||||
}
|
}
|
||||||
@ -685,10 +686,8 @@ solib_aix_get_toc_value (CORE_ADDR pc)
|
|||||||
|
|
||||||
result = (obj_section_addr (data_osect)
|
result = (obj_section_addr (data_osect)
|
||||||
+ xcoff_get_toc_offset (pc_osect->objfile));
|
+ xcoff_get_toc_offset (pc_osect->objfile));
|
||||||
if (solib_aix_debug)
|
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
solib_aix_debug_printf ("pc=%s -> %s", core_addr_to_string (pc),
|
||||||
"DEBUG: solib_aix_get_toc_value (pc=%s) -> %s\n",
|
|
||||||
core_addr_to_string (pc),
|
|
||||||
core_addr_to_string (result));
|
core_addr_to_string (result));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user