projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[gdb/testsuite] Add target board gold
[deliverable/binutils-gdb.git]
/
gdbserver
/
linux-riscv-low.cc
diff --git
a/gdbserver/linux-riscv-low.cc
b/gdbserver/linux-riscv-low.cc
index 4fb2308a4528968cdee868044d464fa2b9639504..1c6e8c44dd9e7333d4657700b6488c713c2d52e3 100644
(file)
--- a/
gdbserver/linux-riscv-low.cc
+++ b/
gdbserver/linux-riscv-low.cc
@@
-38,6
+38,10
@@
public:
const regs_info *get_regs_info () override;
const regs_info *get_regs_info () override;
+ int breakpoint_kind_from_pc (CORE_ADDR *pcptr) override;
+
+ const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
+
protected:
void low_arch_setup () override;
protected:
void low_arch_setup () override;
@@
-53,6
+57,8
@@
protected:
CORE_ADDR low_get_pc (regcache *regcache) override;
void low_set_pc (regcache *regcache, CORE_ADDR newpc) override;
CORE_ADDR low_get_pc (regcache *regcache) override;
void low_set_pc (regcache *regcache, CORE_ADDR newpc) override;
+
+ bool low_breakpoint_at (CORE_ADDR pc) override;
};
/* The singleton target ops object. */
};
/* The singleton target ops object. */
@@
-245,10
+251,10
@@
riscv_target::low_set_pc (regcache *regcache, CORE_ADDR newpc)
static const uint16_t riscv_ibreakpoint[] = { 0x0073, 0x0010 };
static const uint16_t riscv_cbreakpoint = 0x9002;
static const uint16_t riscv_ibreakpoint[] = { 0x0073, 0x0010 };
static const uint16_t riscv_cbreakpoint = 0x9002;
-/* Implementation of
linux_target_
ops method "breakpoint_kind_from_pc". */
+/* Implementation of
target
ops method "breakpoint_kind_from_pc". */
-
static
int
-riscv_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
+int
+riscv_
target::
breakpoint_kind_from_pc (CORE_ADDR *pcptr)
{
union
{
{
union
{
@@
-264,10
+270,10
@@
riscv_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
return sizeof (riscv_cbreakpoint);
}
return sizeof (riscv_cbreakpoint);
}
-/* Implementation of
linux_target_
ops method "sw_breakpoint_from_kind". */
+/* Implementation of
target
ops method "sw_breakpoint_from_kind". */
-
static
const gdb_byte *
-riscv_sw_breakpoint_from_kind (int kind, int *size)
+const gdb_byte *
+riscv_
target::
sw_breakpoint_from_kind (int kind, int *size)
{
*size = kind;
switch (kind)
{
*size = kind;
switch (kind)
@@
-279,10
+285,10
@@
riscv_sw_breakpoint_from_kind (int kind, int *size)
}
}
}
}
-/* Implementation of linux
_target_ops method "
breakpoint_at". */
+/* Implementation of linux
target ops method "low_
breakpoint_at". */
-static int
-riscv_breakpoint_at (CORE_ADDR pc)
+bool
+riscv_
target::low_
breakpoint_at (CORE_ADDR pc)
{
union
{
{
union
{
@@
-297,21
+303,11
@@
riscv_breakpoint_at (CORE_ADDR pc)
&& target_read_memory (pc + sizeof (buf.insn), buf.bytes,
sizeof (buf.insn)) == 0
&& buf.insn == riscv_ibreakpoint[1])))
&& target_read_memory (pc + sizeof (buf.insn), buf.bytes,
sizeof (buf.insn)) == 0
&& buf.insn == riscv_ibreakpoint[1])))
- return
1
;
+ return
true
;
else
else
- return
0
;
+ return
false
;
}
}
-/* RISC-V/Linux target operations. */
-struct linux_target_ops the_low_target =
-{
- riscv_breakpoint_kind_from_pc,
- riscv_sw_breakpoint_from_kind,
- NULL, /* get_next_pcs */
- 0, /* decr_pc_after_break */
- riscv_breakpoint_at,
-};
-
/* The linux target ops object. */
linux_process_target *the_linux_target = &the_riscv_target;
/* The linux target ops object. */
linux_process_target *the_linux_target = &the_riscv_target;
This page took
0.024234 seconds
and
4
git commands to generate.