GDB (xrefs)
|
#include "defs.h"
#include "gdbsupport/gdb_select.h"
#include "ui.h"
#include "target.h"
#include "guile-internal.h"
#include "gdbsupport/gdb_optional.h"
Go to the source code of this file.
Classes | |
class | ioscm_file_port |
struct | ioscm_memory_port |
Macros | |
#define | USING_GUILE_BEFORE_2_2 (SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION == 0) |
#define | GDB_STDIO_BUFFER_DEFAULT_SIZE 1024 |
Enumerations | |
enum | oport { GDB_STDOUT , GDB_STDERR } |
Functions | |
static SCM | ioscm_open_port (scm_t_port_type *port_type, long mode_bits, scm_t_bits stream) |
static void | fputsn_filtered (const char *s, size_t size, struct ui_file *stream) |
static size_t | ioscm_read_from_port (SCM port, SCM dst, size_t start, size_t count) |
static size_t | ioscm_write (SCM port, SCM src, size_t start, size_t count) |
static void | ioscm_init_gdb_stdio_port (void) |
static void | ioscm_init_stdio_buffers (SCM port, long mode_bits) |
static SCM | ioscm_make_gdb_stdio_port (int fd) |
static SCM | gdbscm_stdio_port_p (SCM scm) |
static SCM | gdbscm_input_port (void) |
static SCM | gdbscm_output_port (void) |
static SCM | gdbscm_error_port (void) |
static SCM | ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport, const char *func_name) |
static SCM | gdbscm_percent_with_gdb_output_to_port (SCM port, SCM thunk) |
static SCM | gdbscm_percent_with_gdb_error_to_port (SCM port, SCM thunk) |
static int | ioscm_lseek_address (ioscm_memory_port *iomem, LONGEST offset, int whence) |
static void | gdbscm_get_natural_buffer_sizes (SCM port, size_t *read_size, size_t *write_size) |
static size_t | gdbscm_memory_port_read (SCM port, SCM dst, size_t start, size_t count) |
static size_t | gdbscm_memory_port_write (SCM port, SCM src, size_t start, size_t count) |
static scm_t_off | gdbscm_memory_port_seek (SCM port, scm_t_off offset, int whence) |
static void | gdbscm_memory_port_close (SCM port) |
static int | gdbscm_memory_port_print (SCM exp, SCM port, scm_print_state *pstate) |
static void | ioscm_init_memory_port_type (void) |
static long | ioscm_parse_mode_bits (const char *func_name, const char *mode) |
static ioscm_memory_port * | ioscm_init_memory_port_stream (CORE_ADDR start, CORE_ADDR end) |
static SCM | gdbscm_open_memory (SCM rest) |
static int | gdbscm_is_memory_port (SCM obj) |
static SCM | gdbscm_memory_port_p (SCM obj) |
static SCM | gdbscm_memory_port_range (SCM port) |
static SCM | gdbscm_memory_port_read_buffer_size (SCM port) |
static SCM | gdbscm_set_memory_port_read_buffer_size_x (SCM port, SCM size) |
static SCM | gdbscm_memory_port_write_buffer_size (SCM port) |
static SCM | gdbscm_set_memory_port_write_buffer_size_x (SCM port, SCM size) |
void | gdbscm_initialize_ports (void) |
Variables | |
static SCM | orig_input_port_scm |
static SCM | orig_output_port_scm |
static SCM | orig_error_port_scm |
static scm_t_port_type * | stdio_port_desc |
static char | stdio_port_desc_name [] = "gdb:stdio-port" |
static const char | input_port_name [] = "gdb:stdin" |
static const char | output_port_name [] = "gdb:stdout" |
static const char | error_port_name [] = "gdb:stderr" |
static SCM | input_port_scm |
static SCM | output_port_scm |
static SCM | error_port_scm |
static scm_t_port_type * | memory_port_desc |
static char | memory_port_desc_name [] = "gdb:memory-port" |
static const unsigned | natural_buf_size = 16 |
static SCM | mode_keyword |
static SCM | start_keyword |
static SCM | size_keyword |
static const scheme_function | port_functions [] |
static const scheme_function | private_port_functions [] |
#define GDB_STDIO_BUFFER_DEFAULT_SIZE 1024 |
Definition at line 425 of file scm-ports.c.
Referenced by ioscm_init_stdio_buffers().
#define USING_GUILE_BEFORE_2_2 (SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION == 0) |
Definition at line 41 of file scm-ports.c.
Referenced by ioscm_init_gdb_stdio_port(), and ioscm_init_memory_port_type().
enum oport |
Enumerator | |
---|---|
GDB_STDOUT | |
GDB_STDERR |
Definition at line 114 of file scm-ports.c.
|
static |
Definition at line 198 of file scm-ports.c.
References gdb_putc(), gdb_puts(), and size.
Referenced by ioscm_write().
|
static |
Definition at line 559 of file scm-ports.c.
References error_port_scm.
|
static |
Definition at line 1053 of file scm-ports.c.
References natural_buf_size, size, and ioscm_memory_port::size.
Referenced by ioscm_init_memory_port_type().
void gdbscm_initialize_ports | ( | void | ) |
Definition at line 1614 of file scm-ports.c.
References error_port_scm, gdbscm_define_functions(), input_port_scm, ioscm_init_gdb_stdio_port(), ioscm_init_memory_port_type(), ioscm_make_gdb_stdio_port(), mode_keyword, orig_error_port_scm, orig_input_port_scm, orig_output_port_scm, output_port_scm, port_functions, private_port_functions, size_keyword, and start_keyword.
|
static |
Definition at line 543 of file scm-ports.c.
References input_port_scm.
|
static |
Definition at line 1380 of file scm-ports.c.
References memory_port_desc.
Referenced by gdbscm_memory_port_p(), gdbscm_memory_port_range(), gdbscm_memory_port_read_buffer_size(), gdbscm_memory_port_write_buffer_size(), gdbscm_set_memory_port_read_buffer_size_x(), and gdbscm_set_memory_port_write_buffer_size_x().
|
static |
Definition at line 1134 of file scm-ports.c.
Referenced by ioscm_init_memory_port_type().
|
static |
Definition at line 1392 of file scm-ports.c.
References gdbscm_is_memory_port().
|
static |
Definition at line 1146 of file scm-ports.c.
References ioscm_memory_port::end, gdbscm_printf(), memory_port_desc_name, and ioscm_memory_port::start.
Referenced by ioscm_init_memory_port_type().
|
static |
Definition at line 1400 of file scm-ports.c.
References ioscm_memory_port::end, FUNC_NAME, gdbscm_is_memory_port(), gdbscm_scm_from_ulongest(), memory_port_desc_name, and ioscm_memory_port::start.
|
static |
Definition at line 1068 of file scm-ports.c.
References ioscm_memory_port::current, FUNC_NAME, gdbscm_memory_error(), ioscm_memory_port::size, ioscm_memory_port::start, and target_read_memory().
Referenced by ioscm_init_memory_port_type().
|
static |
Definition at line 1415 of file scm-ports.c.
References FUNC_NAME, gdbscm_is_memory_port(), and memory_port_desc_name.
|
static |
Definition at line 1115 of file scm-ports.c.
References ioscm_memory_port::current, FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_scm_from_longest(), and ioscm_lseek_address().
Referenced by ioscm_init_memory_port_type().
|
static |
Definition at line 1092 of file scm-ports.c.
References ioscm_memory_port::current, FUNC_NAME, gdbscm_memory_error(), gdbscm_out_of_range_error(), ioscm_memory_port::size, ioscm_memory_port::start, and target_write_memory().
Referenced by ioscm_init_memory_port_type().
|
static |
Definition at line 1465 of file scm-ports.c.
References FUNC_NAME, gdbscm_is_memory_port(), and memory_port_desc_name.
|
static |
Definition at line 1315 of file scm-ports.c.
References FUNC_NAME, gdbscm_out_of_range_error(), gdbscm_parse_function_args(), gdbscm_scm_from_ulongest(), ioscm_init_memory_port_stream(), ioscm_open_port(), ioscm_parse_mode_bits(), memory_port_desc, mode_keyword, size, size_keyword, and start_keyword.
|
static |
Definition at line 551 of file scm-ports.c.
References output_port_scm.
|
static |
Definition at line 649 of file scm-ports.c.
References FUNC_NAME, GDB_STDERR, and ioscm_with_output_to_port_worker().
|
static |
Definition at line 634 of file scm-ports.c.
References FUNC_NAME, GDB_STDOUT, and ioscm_with_output_to_port_worker().
|
static |
Definition at line 1435 of file scm-ports.c.
References FUNC_NAME, gdbscm_is_memory_port(), gdbscm_out_of_range_error(), memory_port_desc_name, and size.
|
static |
Definition at line 1485 of file scm-ports.c.
References FUNC_NAME, gdbscm_is_memory_port(), gdbscm_out_of_range_error(), memory_port_desc_name, and size.
|
static |
Definition at line 526 of file scm-ports.c.
References stdio_port_desc.
|
static |
Definition at line 407 of file scm-ports.c.
References ioscm_read_from_port(), ioscm_write(), stdio_port_desc, stdio_port_desc_name, and USING_GUILE_BEFORE_2_2.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 1226 of file scm-ports.c.
References ioscm_memory_port::current, ioscm_memory_port::end, ioscm_memory_port::size, and ioscm_memory_port::start.
Referenced by gdbscm_open_memory().
|
static |
Definition at line 1162 of file scm-ports.c.
References gdbscm_get_natural_buffer_sizes(), gdbscm_memory_port_close(), gdbscm_memory_port_print(), gdbscm_memory_port_read(), gdbscm_memory_port_seek(), gdbscm_memory_port_write(), memory_port_desc, memory_port_desc_name, and USING_GUILE_BEFORE_2_2.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 473 of file scm-ports.c.
References GDB_STDIO_BUFFER_DEFAULT_SIZE.
Referenced by ioscm_make_gdb_stdio_port().
|
static |
Definition at line 661 of file scm-ports.c.
References ioscm_memory_port::current, SEEK_CUR, SEEK_SET, and ioscm_memory_port::size.
Referenced by gdbscm_memory_port_seek().
|
static |
Definition at line 487 of file scm-ports.c.
References error_port_name, gdbscm_scm_from_c_string(), input_port_name, ioscm_init_stdio_buffers(), ioscm_open_port(), name, output_port_name, and stdio_port_desc.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 184 of file scm-ports.c.
Referenced by gdbscm_open_memory(), and ioscm_make_gdb_stdio_port().
|
static |
Definition at line 1189 of file scm-ports.c.
References gdbscm_out_of_range_error(), and gdbscm_scm_from_c_string().
Referenced by gdbscm_open_memory().
|
static |
Definition at line 351 of file scm-ports.c.
References FUNC_NAME, gdb_flush(), gdb_stderr, gdb_stdin, gdb_stdout, input_port_scm, and read().
Referenced by ioscm_init_gdb_stdio_port().
|
static |
Definition at line 585 of file scm-ports.c.
References ui::async, current_ui, current_uiout, GDB_STDERR, gdb_stderr, gdb_stdout, gdbscm_is_exception(), gdbscm_is_true, gdbscm_safe_call_0(), and gdbscm_throw().
Referenced by gdbscm_percent_with_gdb_error_to_port(), and gdbscm_percent_with_gdb_output_to_port().
|
static |
Definition at line 374 of file scm-ports.c.
References error_port_scm, fputsn_filtered(), gdb_stderr, gdb_stdout, GDBSCM_HANDLE_GDB_EXCEPTION, input_port_scm, and unpack().
Referenced by ioscm_init_gdb_stdio_port().
|
static |
Definition at line 104 of file scm-ports.c.
Referenced by ioscm_make_gdb_stdio_port().
|
static |
Definition at line 111 of file scm-ports.c.
Referenced by gdbscm_error_port(), gdbscm_initialize_ports(), and ioscm_write().
|
static |
Definition at line 102 of file scm-ports.c.
Referenced by ioscm_make_gdb_stdio_port().
|
static |
Definition at line 109 of file scm-ports.c.
Referenced by gdbscm_initialize_ports(), gdbscm_input_port(), ioscm_read_from_port(), and ioscm_write().
|
static |
Definition at line 120 of file scm-ports.c.
Referenced by gdbscm_is_memory_port(), gdbscm_open_memory(), and ioscm_init_memory_port_type().
|
static |
Definition at line 124 of file scm-ports.c.
Referenced by gdbscm_memory_port_print(), gdbscm_memory_port_range(), gdbscm_memory_port_read_buffer_size(), gdbscm_memory_port_write_buffer_size(), gdbscm_set_memory_port_read_buffer_size_x(), gdbscm_set_memory_port_write_buffer_size_x(), and ioscm_init_memory_port_type().
|
static |
Definition at line 152 of file scm-ports.c.
Referenced by gdbscm_initialize_ports(), and gdbscm_open_memory().
|
static |
Definition at line 147 of file scm-ports.c.
Referenced by gdbscm_get_natural_buffer_sizes().
|
static |
Definition at line 89 of file scm-ports.c.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 87 of file scm-ports.c.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 88 of file scm-ports.c.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 103 of file scm-ports.c.
Referenced by ioscm_make_gdb_stdio_port().
|
static |
Definition at line 110 of file scm-ports.c.
Referenced by gdbscm_initialize_ports(), and gdbscm_output_port().
|
static |
Definition at line 1514 of file scm-ports.c.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 1576 of file scm-ports.c.
Referenced by gdbscm_initialize_ports().
|
static |
Definition at line 154 of file scm-ports.c.
Referenced by gdbscm_initialize_ports(), and gdbscm_open_memory().
|
static |
Definition at line 153 of file scm-ports.c.
Referenced by gdbscm_initialize_ports(), and gdbscm_open_memory().
|
static |
Definition at line 95 of file scm-ports.c.
Referenced by gdbscm_stdio_port_p(), ioscm_init_gdb_stdio_port(), and ioscm_make_gdb_stdio_port().
|
static |
Definition at line 99 of file scm-ports.c.
Referenced by ioscm_init_gdb_stdio_port().