GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
debuginfod-support.c File Reference
#include "defs.h"
#include "diagnostics.h"
#include <errno.h>
#include "gdbsupport/scoped_fd.h"
#include "debuginfod-support.h"
#include "gdbsupport/gdb_optional.h"
#include "cli/cli-cmds.h"
#include "cli/cli-style.h"
#include "cli-out.h"
#include "target.h"

Go to the source code of this file.

Macros

#define NO_IMPL   _("Support for debuginfod is not compiled into GDB.")
 

Functions

scoped_fd debuginfod_source_query (const unsigned char *build_id, int build_id_len, const char *srcpath, gdb::unique_xmalloc_ptr< char > *destname)
 
scoped_fd debuginfod_debuginfo_query (const unsigned char *build_id, int build_id_len, const char *filename, gdb::unique_xmalloc_ptr< char > *destname)
 
scoped_fd debuginfod_exec_query (const unsigned char *build_id, int build_id_len, const char *filename, gdb::unique_xmalloc_ptr< char > *destname)
 
scoped_fd debuginfod_section_query (const unsigned char *build_id, int build_id_len, const char *filename, const char *section_name, gdb::unique_xmalloc_ptr< char > *destname)
 
static void set_debuginfod_enabled (const char *value)
 
static const char * get_debuginfod_enabled ()
 
static void show_debuginfod_enabled (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value)
 
static void set_debuginfod_urls (const std::string &urls)
 
static const std::string & get_debuginfod_urls ()
 
static void show_debuginfod_urls (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value)
 
static void show_debuginfod_verbose_command (ui_file *file, int from_tty, cmd_list_element *cmd, const char *value)
 
static void maint_set_debuginfod_download_sections (bool value)
 
static bool maint_get_debuginfod_download_sections ()
 
void _initialize_debuginfod ()
 

Variables

static cmd_list_elementset_debuginfod_prefix_list
 
static cmd_list_elementshow_debuginfod_prefix_list
 
static cmd_list_elementmaint_set_debuginfod_cmdlist
 
static cmd_list_elementmaint_show_debuginfod_cmdlist
 
static const char debuginfod_on [] = "on"
 
static const char debuginfod_off [] = "off"
 
static const char debuginfod_ask [] = "ask"
 
static const char * debuginfod_enabled_enum []
 
static const char * debuginfod_enabled
 
static bool debuginfod_download_sections
 
static unsigned int debuginfod_verbose = 1
 

Macro Definition Documentation

◆ NO_IMPL

#define NO_IMPL   _("Support for debuginfod is not compiled into GDB.")

Definition at line 104 of file debuginfod-support.c.

Referenced by set_debuginfod_enabled(), and set_debuginfod_urls().

Function Documentation

◆ _initialize_debuginfod()

void _initialize_debuginfod ( )

Definition at line 602 of file debuginfod-support.c.

Referenced by initialize_all_files().

◆ debuginfod_debuginfo_query()

scoped_fd debuginfod_debuginfo_query ( const unsigned char * build_id,
int build_id_len,
const char * filename,
gdb::unique_xmalloc_ptr< char > * destname )

Definition at line 78 of file debuginfod-support.c.

Referenced by dwarf2_get_dwz_file(), and elf_symfile_read_dwarf2().

◆ debuginfod_exec_query()

scoped_fd debuginfod_exec_query ( const unsigned char * build_id,
int build_id_len,
const char * filename,
gdb::unique_xmalloc_ptr< char > * destname )

◆ debuginfod_section_query()

scoped_fd debuginfod_section_query ( const unsigned char * build_id,
int build_id_len,
const char * filename,
const char * section_name,
gdb::unique_xmalloc_ptr< char > * destname )

Definition at line 96 of file debuginfod-support.c.

◆ debuginfod_source_query()

scoped_fd debuginfod_source_query ( const unsigned char * build_id,
int build_id_len,
const char * srcpath,
gdb::unique_xmalloc_ptr< char > * destname )

Definition at line 69 of file debuginfod-support.c.

Referenced by open_source_file().

◆ get_debuginfod_enabled()

static const char * get_debuginfod_enabled ( )
static

Definition at line 506 of file debuginfod-support.c.

References debuginfod_enabled.

◆ get_debuginfod_urls()

static const std::string & get_debuginfod_urls ( )
static

Definition at line 538 of file debuginfod-support.c.

◆ maint_get_debuginfod_download_sections()

static bool maint_get_debuginfod_download_sections ( )
static

Definition at line 593 of file debuginfod-support.c.

References debuginfod_download_sections.

◆ maint_set_debuginfod_download_sections()

static void maint_set_debuginfod_download_sections ( bool value)
static

Definition at line 579 of file debuginfod-support.c.

References debuginfod_download_sections, and value.

◆ set_debuginfod_enabled()

static void set_debuginfod_enabled ( const char * value)
static

Definition at line 492 of file debuginfod-support.c.

References debuginfod_enabled, debuginfod_off, NO_IMPL, and value.

◆ set_debuginfod_urls()

static void set_debuginfod_urls ( const std::string & urls)
static

Definition at line 525 of file debuginfod-support.c.

References NO_IMPL.

◆ show_debuginfod_enabled()

static void show_debuginfod_enabled ( ui_file * file,
int from_tty,
cmd_list_element * cmd,
const char * value )
static

Definition at line 514 of file debuginfod-support.c.

References debuginfod_enabled, and gdb_printf().

◆ show_debuginfod_urls()

static void show_debuginfod_urls ( ui_file * file,
int from_tty,
cmd_list_element * cmd,
const char * value )
static

Definition at line 556 of file debuginfod-support.c.

References gdb_printf().

◆ show_debuginfod_verbose_command()

static void show_debuginfod_verbose_command ( ui_file * file,
int from_tty,
cmd_list_element * cmd,
const char * value )
static

Definition at line 569 of file debuginfod-support.c.

References gdb_printf().

Variable Documentation

◆ debuginfod_ask

const char debuginfod_ask[] = "ask"
static

Definition at line 40 of file debuginfod-support.c.

◆ debuginfod_download_sections

bool debuginfod_download_sections
static
Initial value:
=
false

Definition at line 58 of file debuginfod-support.c.

Referenced by maint_get_debuginfod_download_sections(), and maint_set_debuginfod_download_sections().

◆ debuginfod_enabled

const char* debuginfod_enabled
static
Initial value:
=
static const char debuginfod_off[]

Definition at line 50 of file debuginfod-support.c.

Referenced by get_debuginfod_enabled(), set_debuginfod_enabled(), and show_debuginfod_enabled().

◆ debuginfod_enabled_enum

const char* debuginfod_enabled_enum[]
static
Initial value:
=
{
nullptr
}
static const char debuginfod_on[]
static const char debuginfod_ask[]

Definition at line 42 of file debuginfod-support.c.

◆ debuginfod_off

const char debuginfod_off[] = "off"
static

Definition at line 39 of file debuginfod-support.c.

Referenced by set_debuginfod_enabled().

◆ debuginfod_on

const char debuginfod_on[] = "on"
static

Definition at line 38 of file debuginfod-support.c.

◆ debuginfod_verbose

unsigned int debuginfod_verbose = 1
static

Definition at line 65 of file debuginfod-support.c.

◆ maint_set_debuginfod_cmdlist

cmd_list_element* maint_set_debuginfod_cmdlist
static

Definition at line 35 of file debuginfod-support.c.

◆ maint_show_debuginfod_cmdlist

cmd_list_element* maint_show_debuginfod_cmdlist
static

Definition at line 36 of file debuginfod-support.c.

◆ set_debuginfod_prefix_list

cmd_list_element* set_debuginfod_prefix_list
static

Definition at line 31 of file debuginfod-support.c.

◆ show_debuginfod_prefix_list

cmd_list_element* show_debuginfod_prefix_list
static

Definition at line 32 of file debuginfod-support.c.