GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
/tmp/gdb-13.1/gdb/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"
#include <elfutils/debuginfod.h>

Go to the source code of this file.

Classes

struct  user_data
 
struct  debuginfod_client_deleter
 

Typedefs

using debuginfod_client_up = std::unique_ptr< debuginfod_client, debuginfod_client_deleter >
 

Functions

static const char * get_size_and_unit (double &size)
 
static int progressfn (debuginfod_client *c, long cur, long total)
 
static debuginfod_client * get_debuginfod_client ()
 
static bool debuginfod_is_enabled ()
 
static void print_outcome (user_data &data, int fd)
 
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)
 
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)
 
void _initialize_debuginfod ()
 

Variables

static cmd_list_elementset_debuginfod_prefix_list
 
static cmd_list_elementshow_debuginfod_prefix_list
 
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 unsigned int debuginfod_verbose = 1
 

Typedef Documentation

◆ debuginfod_client_up

using debuginfod_client_up = std::unique_ptr<debuginfod_client, debuginfod_client_deleter>

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

Function Documentation

◆ _initialize_debuginfod()

void _initialize_debuginfod ( )

Definition at line 484 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 
)

◆ 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_is_enabled()

static bool debuginfod_is_enabled ( )
static

◆ 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 
)

◆ get_debuginfod_client()

static debuginfod_client * get_debuginfod_client ( )
static

◆ get_debuginfod_enabled()

static const char * get_debuginfod_enabled ( )
static

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

References debuginfod_enabled.

◆ get_debuginfod_urls()

static const std::string & get_debuginfod_urls ( )
static

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

◆ get_size_and_unit()

static const char * get_size_and_unit ( double &  size)
static

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

References size.

Referenced by progressfn().

◆ print_outcome()

static void print_outcome ( user_data data,
int  fd 
)
static

◆ progressfn()

static int progressfn ( debuginfod_client *  c,
long  cur,
long  total 
)
static

◆ set_debuginfod_enabled()

static void set_debuginfod_enabled ( const char *  value)
static

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

References debuginfod_enabled, and debuginfod_off.

◆ set_debuginfod_urls()

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

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

◆ 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 418 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 460 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 473 of file debuginfod-support.c.

References gdb_printf().

Variable Documentation

◆ debuginfod_ask

const char debuginfod_ask[] = "ask"
static

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

Referenced by debuginfod_is_enabled().

◆ debuginfod_enabled

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

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

Referenced by debuginfod_is_enabled(), 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_off[]

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

◆ debuginfod_off

const char debuginfod_off[] = "off"
static

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

Referenced by debuginfod_is_enabled(), and set_debuginfod_enabled().

◆ debuginfod_on

const char debuginfod_on[] = "on"
static

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

Referenced by debuginfod_is_enabled().

◆ debuginfod_verbose

unsigned int debuginfod_verbose = 1
static

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

Referenced by progressfn().

◆ 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.