/* Support for connecting Guile's stdio to GDB's.
as well as r/w memory via ports.
- Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Copyright (C) 2014-2020 Free Software Foundation, Inc.
This file is part of GDB.
conventions, et.al. */
#include "defs.h"
-#include "gdb_select.h"
+#include "gdbsupport/gdb_select.h"
#include "top.h"
#include "target.h"
#include "guile-internal.h"
-#include "common/gdb_optional.h"
+#include "gdbsupport/gdb_optional.h"
#ifdef HAVE_POLL
#if defined (HAVE_POLL_H)
gdb_flush (gdb_stdout);
gdb_flush (gdb_stderr);
- count = ui_file_read (gdb_stdin, (char *) pt->read_buf, pt->read_buf_size);
+ count = gdb_stdin->read ((char *) pt->read_buf, pt->read_buf_size);
if (count == -1)
scm_syserror (FUNC_NAME);
if (count == 0)
if (scm_is_eq (port, input_port_scm))
return;
+ gdbscm_gdb_exception exc {};
try
{
if (scm_is_eq (port, error_port_scm))
else
fputsn_filtered ((const char *) data, size, gdb_stdout);
}
- catch (const gdb_exception_RETURN_MASK_ALL &except)
+ catch (const gdb_exception &except)
{
- GDBSCM_HANDLE_GDB_EXCEPTION (except);
+ exc = unpack (except);
}
+ GDBSCM_HANDLE_GDB_EXCEPTION (exc);
}
/* Flush gdb's stdout or stderr. */