GDB (xrefs)

Classes | Macros | Functions
buffer.h File Reference

Go to the source code of this file.

## Classes
struct | buffer

## Macros
#define | buffer_grow_str(BUFFER, STRING) buffer_grow (BUFFER, STRING, strlen (STRING))
#define | buffer_grow_str0(BUFFER, STRING) buffer_grow (BUFFER, STRING, strlen (STRING) + 1)

## Functions
void | buffer_grow (struct buffer *buffer, const char *data, size_t size)
static void | buffer_grow_char (struct buffer *buffer, char c)
void | buffer_free (struct buffer *buffer)
void | buffer_init (struct buffer *buffer)
char * | buffer_finish (struct buffer *buffer)
void | buffer_xml_printf (struct buffer *buffer, const char *format,...) ATTRIBUTE_PRINTF(2

## Macro Definition Documentation

## ◆ buffer_grow_str

#define buffer_grow_str | ( |  | BUFFER,
|  |  | STRING
| ) |  | buffer_grow (BUFFER, STRING, strlen (STRING))

Definition at line 63 of file buffer.h.

Referenced by buffer_xml_printf(), linux_common_xfer_osdata(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), linux_xfer_osdata_threads(), and tfile_append_tdesc_line().

## ◆ buffer_grow_str0

#define buffer_grow_str0 | ( |  | BUFFER,
|  |  | STRING
| ) |  | buffer_grow (BUFFER, STRING, strlen (STRING) + 1)

Definition at line 65 of file buffer.h.

Referenced by linux_common_xfer_osdata(), linux_nat_attach(), linux_ptrace_attach_fail_reason_string(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), and linux_xfer_osdata_threads().

## Function Documentation

## ◆ buffer_finish()

char* buffer_finish | ( | struct buffer * | buffer | ) |

Definition at line 66 of file buffer.c.

References buffer::buffer, buffer::buffer_size, and buffer::used_size.

Referenced by gdb_readline_no_editing(), gdb_readline_no_editing_callback(), handle_line_of_input(), linux_common_xfer_osdata(), linux_nat_attach(), linux_ptrace_attach_fail_reason_string(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), and linux_xfer_osdata_threads().

## ◆ buffer_free()

void buffer_free | ( | struct buffer * | buffer | ) |

Definition at line 48 of file buffer.c.

References buffer::buffer, buffer::buffer_size, buffer::used_size, and xfree().

Referenced by linux_common_xfer_osdata(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), linux_xfer_osdata_threads(), tfile_close(), and tfile_open().

## ◆ buffer_grow()

void buffer_grow | ( | struct buffer * | buffer,
|  | const char * | data,
|  | size_t | size
| ) |  |

Definition at line 25 of file buffer.c.

References buffer::buffer, buffer::buffer_size, size, buffer::used_size, and xrealloc().

Referenced by buffer_grow_char(), buffer_xml_printf(), and command_line_append_input_line().

## ◆ buffer_grow_char()

static void buffer_grow_char | ( | struct buffer * | buffer,
|  | char | c
| ) |  |
| inline static

Definition at line 38 of file buffer.h.

References buffer_grow().

Referenced by gdb_readline_no_editing(), and gdb_readline_no_editing_callback().

## ◆ buffer_init()

void buffer_init | ( | struct buffer * | buffer | ) |

Definition at line 60 of file buffer.c.

References memset().

Referenced by command_line_input(), gdb_readline_no_editing(), gdb_readline_no_editing_callback(), linux_common_xfer_osdata(), linux_nat_attach(), linux_ptrace_attach_fail_reason_string(), linux_xfer_osdata_cpus(), linux_xfer_osdata_fds(), linux_xfer_osdata_isockets(), linux_xfer_osdata_modules(), linux_xfer_osdata_msg(), linux_xfer_osdata_processes(), linux_xfer_osdata_processgroups(), linux_xfer_osdata_sem(), linux_xfer_osdata_shm(), linux_xfer_osdata_threads(), and ui::ui().

## ◆ buffer_xml_printf()

void buffer_xml_printf | ( | struct buffer * | buffer,
|  | const char * | format,
|  |  | ...
| ) |  |