GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/minidebug.c File Reference
`#include "defs.h"`
`#include "gdb_bfd.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "gdbcore.h"`
`#include <algorithm>`
`#include <lzma.h>`

Go to the source code of this file.

## Classes
struct | gdb_lzma_stream

## Functions
static void * | alloc_lzma (void *opaque, size_t nmemb, size_t size)
static void | free_lzma (void *opaque, void *ptr)
static void * | lzma_open (struct bfd *nbfd, void *open_closure)
static file_ptr | lzma_pread (struct bfd *nbfd, void *stream, void *buf, file_ptr nbytes, file_ptr offset)
static int | lzma_close (struct bfd *nbfd, void *stream)
static int | lzma_stat (struct bfd *abfd, void *stream, struct stat *sb)
gdb_bfd_ref_ptr | find_separate_debug_file_in_section (struct objfile *objfile)

## Variables
static lzma_allocator | gdb_lzma_allocator = { alloc_lzma, free_lzma, NULL }

## Function Documentation

## ◆ alloc_lzma()

static void* alloc_lzma | ( | void * | opaque,
|  | size_t | nmemb,
|  | size_t | size
| ) |  |
| static

Definition at line 34 of file minidebug.c.

References size, and xmalloc().

## ◆ find_separate_debug_file_in_section()

gdb_bfd_ref_ptr find_separate_debug_file_in_section | ( | struct objfile * | objfile | ) |

Definition at line 259 of file minidebug.c.

References _, gdb_bfd_openr_iovec(), gdb::ref_ptr< T, Policy >::get(), gnutarget, lzma_close(), lzma_open(), lzma_pread(), lzma_stat(), objfile::obfd, objfile_name(), gdb_lzma_stream::section, and warning().

Referenced by read_symbols().

## ◆ free_lzma()

static void free_lzma | ( | void * | opaque,
|  | void * | ptr
| ) |  |
| static

Definition at line 42 of file minidebug.c.

References xfree().

## ◆ lzma_close()

static int lzma_close | ( | struct bfd * | nbfd,
|  | void * | stream
| ) |  |
| static

Definition at line 220 of file minidebug.c.

References gdb_lzma_stream::data, gdb_lzma_allocator, gdb_lzma_stream::index, and xfree().

Referenced by find_separate_debug_file_in_section().

## ◆ lzma_open()

static void* lzma_open | ( | struct bfd * | nbfd,
|  | void * | open_closure
| ) |  |
| static

Definition at line 78 of file minidebug.c.

References gdb_lzma_allocator, gdb_lzma_stream::index, offset, gdb_lzma_stream::section, SEEK_SET, size, XCNEW, xfree(), and xmalloc().

Referenced by find_separate_debug_file_in_section().

## ◆ lzma_pread()

static file_ptr lzma_pread | ( | struct bfd * | nbfd,
|  | void * | stream,
|  | void * | buf,
|  | file_ptr | nbytes,
|  | file_ptr | offset
| ) |  |
| static

Definition at line 133 of file minidebug.c.

References gdb_lzma_stream::data, gdb_lzma_stream::data_end, gdb_lzma_stream::data_start, gdb_lzma_allocator, gdb_lzma_stream::index, memset(), offset, gdb_lzma_stream::section, SEEK_SET, xfree(), and xmalloc().

Referenced by find_separate_debug_file_in_section().

## ◆ lzma_stat()

static int lzma_stat | ( | struct bfd * | abfd,
|  | void * | stream,
|  | struct stat * | sb
| ) |  |
| static

Definition at line 238 of file minidebug.c.

References gdb_lzma_stream::index, and memset().

Referenced by find_separate_debug_file_in_section().

## Variable Documentation

## ◆ gdb_lzma_allocator

lzma_allocator gdb_lzma_allocator = { alloc_lzma, free_lzma, NULL }
| static

Definition at line 50 of file minidebug.c.

Referenced by lzma_close(), lzma_open(), and lzma_pread().