gdbarch_guess_tracepoint_registers_ftype *guess_tracepoint_registers = default_guess_tracepoint_registers;
gdbarch_auto_charset_ftype *auto_charset = default_auto_charset;
gdbarch_auto_wide_charset_ftype *auto_wide_charset = default_auto_wide_charset;
- const char * solib_symbols_extension = 0;
int has_dos_based_file_system = 0;
gdbarch_gen_return_address_ftype *gen_return_address = default_gen_return_address;
gdbarch_info_proc_ftype *info_proc = nullptr;
/* Skip verify of guess_tracepoint_registers, invalid_p == 0. */
/* Skip verify of auto_charset, invalid_p == 0. */
/* Skip verify of auto_wide_charset, invalid_p == 0. */
- /* Skip verify of solib_symbols_extension, invalid_p == 0. */
/* Skip verify of has_dos_based_file_system, invalid_p == 0. */
/* Skip verify of gen_return_address, invalid_p == 0. */
/* Skip verify of info_proc, has predicate. */
gdb_printf (file,
"gdbarch_dump: auto_wide_charset = <%s>\n",
host_address_to_string (gdbarch->auto_wide_charset));
- gdb_printf (file,
- "gdbarch_dump: solib_symbols_extension = %s\n",
- pstring (gdbarch->solib_symbols_extension));
gdb_printf (file,
"gdbarch_dump: has_dos_based_file_system = %s\n",
plongest (gdbarch->has_dos_based_file_system));
gdbarch->auto_wide_charset = auto_wide_charset;
}
-const char *
-gdbarch_solib_symbols_extension (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of solib_symbols_extension, invalid_p == 0. */
- if (gdbarch_debug >= 2)
- gdb_printf (gdb_stdlog, "gdbarch_solib_symbols_extension called\n");
- return gdbarch->solib_symbols_extension;
-}
-
-void
-set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch,
- const char * solib_symbols_extension)
-{
- gdbarch->solib_symbols_extension = solib_symbols_extension;
-}
-
int
gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch)
{
extern const char * gdbarch_auto_wide_charset (struct gdbarch *gdbarch);
extern void set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, gdbarch_auto_wide_charset_ftype *auto_wide_charset);
-/* If non-empty, this is a file extension that will be opened in place
- of the file extension reported by the shared library list.
-
- This is most useful for toolchains that use a post-linker tool,
- where the names of the files run on the target differ in extension
- compared to the names of the files GDB should load for debug info. */
-
-extern const char * gdbarch_solib_symbols_extension (struct gdbarch *gdbarch);
-extern void set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, const char * solib_symbols_extension);
-
/* If true, the target OS has DOS-based file system semantics. That
is, absolute paths include a drive name, and the backslash is
considered a directory separator. */
invalid=False,
)
-Value(
- comment="""
-If non-empty, this is a file extension that will be opened in place
-of the file extension reported by the shared library list.
-
-This is most useful for toolchains that use a post-linker tool,
-where the names of the files run on the target differ in extension
-compared to the names of the files GDB should load for debug info.
-""",
- type="const char *",
- name="solib_symbols_extension",
- invalid=False,
- printer="pstring (gdbarch->solib_symbols_extension)",
-)
-
Value(
comment="""
If true, the target OS has DOS-based file system semantics. That
gdb::unique_xmalloc_ptr<char>
solib_find (const char *in_pathname, int *fd)
{
- const char *solib_symbols_extension
- = gdbarch_solib_symbols_extension (current_inferior ()->arch ());
-
- /* If solib_symbols_extension is set, replace the file's
- extension. */
- if (solib_symbols_extension != NULL)
- {
- const char *p = in_pathname + strlen (in_pathname);
-
- while (p > in_pathname && *p != '.')
- p--;
-
- if (*p == '.')
- {
- char *new_pathname;
-
- new_pathname
- = (char *) alloca (p - in_pathname + 1
- + strlen (solib_symbols_extension) + 1);
- memcpy (new_pathname, in_pathname, p - in_pathname + 1);
- strcpy (new_pathname + (p - in_pathname) + 1,
- solib_symbols_extension);
-
- in_pathname = new_pathname;
- }
- }
-
return solib_find_1 (in_pathname, fd, true);
}