projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Testsuite: Add gdb_simple_compile
[deliverable/binutils-gdb.git]
/
opcodes
/
rx-dis.c
diff --git
a/opcodes/rx-dis.c
b/opcodes/rx-dis.c
index 01d0385a96e3ca640c31218ebd0e92c1a617a36b..9de3b4ec55f4702878496e6a08239b43bc2fda93 100644
(file)
--- a/
opcodes/rx-dis.c
+++ b/
opcodes/rx-dis.c
@@
-1,5
+1,5
@@
/* Disassembler code for Renesas RX.
/* Disassembler code for Renesas RX.
- Copyright (C) 2008-201
5
Free Software Foundation, Inc.
+ Copyright (C) 2008-201
8
Free Software Foundation, Inc.
Contributed by Red Hat.
Written by DJ Delorie.
Contributed by Red Hat.
Written by DJ Delorie.
@@
-27,22
+27,38
@@
#include "dis-asm.h"
#include "opcode/rx.h"
#include "dis-asm.h"
#include "opcode/rx.h"
+#include <setjmp.h>
+
typedef struct
{
bfd_vma pc;
disassemble_info * dis;
} RX_Data;
typedef struct
{
bfd_vma pc;
disassemble_info * dis;
} RX_Data;
+struct private
+{
+ OPCODES_SIGJMP_BUF bailout;
+};
+
static int
rx_get_byte (void * vdata)
{
bfd_byte buf[1];
RX_Data *rx_data = (RX_Data *) vdata;
static int
rx_get_byte (void * vdata)
{
bfd_byte buf[1];
RX_Data *rx_data = (RX_Data *) vdata;
+ int status;
+
+ status = rx_data->dis->read_memory_func (rx_data->pc,
+ buf,
+ 1,
+ rx_data->dis);
+ if (status != 0)
+ {
+ struct private *priv = (struct private *) rx_data->dis->private_data;
-
rx_data->dis->read_memory_func (
rx_data->pc,
- buf,
- 1,
- rx_data->dis);
+
rx_data->dis->memory_error_func (status,
rx_data->pc,
+ rx_data->dis);
+ OPCODES_SIGLONGJMP (priv->bailout, 1);
+ }
rx_data->pc ++;
return buf[0];
rx_data->pc ++;
return buf[0];
@@
-65,9
+81,9
@@
static char const * register_names[] =
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
/* control register */
"psw", "pc", "usp", "fpsw", NULL, NULL, NULL, NULL,
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
/* control register */
"psw", "pc", "usp", "fpsw", NULL, NULL, NULL, NULL,
- "bpsw", "bpc", "isp", "fintv", "intb", NULL, NULL, NULL,
+ "bpsw", "bpc", "isp", "fintv", "intb", "extb", NULL, NULL,
+ "a0", "a1", NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static char const * condition_names[] =
};
static char const * condition_names[] =
@@
-92,10
+108,18
@@
print_insn_rx (bfd_vma addr, disassemble_info * dis)
RX_Data rx_data;
RX_Opcode_Decoded opcode;
const char * s;
RX_Data rx_data;
RX_Opcode_Decoded opcode;
const char * s;
+ struct private priv;
+ dis->private_data = (PTR) &priv;
rx_data.pc = addr;
rx_data.dis = dis;
rx_data.pc = addr;
rx_data.dis = dis;
+ if (OPCODES_SIGSETJMP (priv.bailout) != 0)
+ {
+ /* Error return. */
+ return -1;
+ }
+
rv = rx_decode_opcode (addr, &opcode, rx_get_byte, &rx_data);
dis->bytes_per_line = 10;
rv = rx_decode_opcode (addr, &opcode, rx_get_byte, &rx_data);
dis->bytes_per_line = 10;
This page took
0.02506 seconds
and
4
git commands to generate.