Rename placed_size to kind
This patch renames placed_size to kind. gdb: 2016-11-03 Yao Qi <yao.qi@linaro.org> * breakpoint.h (struct bp_target_info) <placed_size>: Remove. <kind>: New field. Update all users.
This commit is contained in:
parent
cd6c3b4ffc
commit
579c6ad983
5 changed files with 17 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2016-11-03 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* breakpoint.h (struct bp_target_info) <placed_size>: Remove.
|
||||||
|
<kind>: New field.
|
||||||
|
Update all users.
|
||||||
|
|
||||||
2016-11-03 Yao Qi <yao.qi@linaro.org>
|
2016-11-03 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Define
|
* arch-utils.h (GDBARCH_BREAKPOINT_MANIPULATION): Define
|
||||||
|
|
|
@ -2770,7 +2770,7 @@ insert_bp_location (struct bp_location *bl,
|
||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
bl->overlay_target_info.placed_size
|
bl->overlay_target_info.kind
|
||||||
= breakpoint_kind (bl, &addr);
|
= breakpoint_kind (bl, &addr);
|
||||||
bl->overlay_target_info.placed_address = addr;
|
bl->overlay_target_info.placed_address = addr;
|
||||||
val = target_insert_breakpoint (bl->gdbarch,
|
val = target_insert_breakpoint (bl->gdbarch,
|
||||||
|
@ -13126,7 +13126,7 @@ bkpt_insert_location (struct bp_location *bl)
|
||||||
{
|
{
|
||||||
CORE_ADDR addr = bl->target_info.reqstd_address;
|
CORE_ADDR addr = bl->target_info.reqstd_address;
|
||||||
|
|
||||||
bl->target_info.placed_size = breakpoint_kind (bl, &addr);
|
bl->target_info.kind = breakpoint_kind (bl, &addr);
|
||||||
bl->target_info.placed_address = addr;
|
bl->target_info.placed_address = addr;
|
||||||
|
|
||||||
if (bl->loc_type == bp_loc_hardware_breakpoint)
|
if (bl->loc_type == bp_loc_hardware_breakpoint)
|
||||||
|
|
|
@ -260,13 +260,9 @@ struct bp_target_info
|
||||||
/* The length of the data cached in SHADOW_CONTENTS. */
|
/* The length of the data cached in SHADOW_CONTENTS. */
|
||||||
int shadow_len;
|
int shadow_len;
|
||||||
|
|
||||||
/* The size of the placed breakpoint, according to
|
/* The breakpoint's kind. It is used in 'kind' parameter in Z
|
||||||
gdbarch_breakpoint_from_pc, when the breakpoint was inserted.
|
packets. */
|
||||||
This is generally the same as SHADOW_LEN, unless we did not need
|
int kind;
|
||||||
to read from the target to implement the memory breakpoint
|
|
||||||
(e.g. if a remote stub handled the details). We may still need
|
|
||||||
the size to remove the breakpoint safely. */
|
|
||||||
int placed_size;
|
|
||||||
|
|
||||||
/* Vector of conditions the target should evaluate if it supports target-side
|
/* Vector of conditions the target should evaluate if it supports target-side
|
||||||
breakpoint conditions. */
|
breakpoint conditions. */
|
||||||
|
|
|
@ -44,7 +44,7 @@ default_memory_insert_breakpoint (struct gdbarch *gdbarch,
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
/* Determine appropriate breakpoint contents and size for this address. */
|
/* Determine appropriate breakpoint contents and size for this address. */
|
||||||
bp = gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->placed_size, &bplen);
|
bp = gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->kind, &bplen);
|
||||||
|
|
||||||
/* Save the memory contents in the shadow_contents buffer and then
|
/* Save the memory contents in the shadow_contents buffer and then
|
||||||
write the breakpoint instruction. */
|
write the breakpoint instruction. */
|
||||||
|
@ -76,7 +76,7 @@ default_memory_remove_breakpoint (struct gdbarch *gdbarch,
|
||||||
{
|
{
|
||||||
int bplen;
|
int bplen;
|
||||||
|
|
||||||
gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->placed_size, &bplen);
|
gdbarch_sw_breakpoint_from_kind (gdbarch, bp_tgt->kind, &bplen);
|
||||||
|
|
||||||
return target_write_raw_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
|
return target_write_raw_memory (bp_tgt->placed_address, bp_tgt->shadow_contents,
|
||||||
bplen);
|
bplen);
|
||||||
|
|
|
@ -9719,7 +9719,7 @@ remote_insert_breakpoint (struct target_ops *ops,
|
||||||
*(p++) = ',';
|
*(p++) = ',';
|
||||||
addr = (ULONGEST) remote_address_masked (addr);
|
addr = (ULONGEST) remote_address_masked (addr);
|
||||||
p += hexnumstr (p, addr);
|
p += hexnumstr (p, addr);
|
||||||
xsnprintf (p, endbuf - p, ",%d", bp_tgt->placed_size);
|
xsnprintf (p, endbuf - p, ",%d", bp_tgt->kind);
|
||||||
|
|
||||||
if (remote_supports_cond_breakpoints (ops))
|
if (remote_supports_cond_breakpoints (ops))
|
||||||
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
|
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
|
||||||
|
@ -9775,7 +9775,7 @@ remote_remove_breakpoint (struct target_ops *ops,
|
||||||
|
|
||||||
addr = (ULONGEST) remote_address_masked (bp_tgt->placed_address);
|
addr = (ULONGEST) remote_address_masked (bp_tgt->placed_address);
|
||||||
p += hexnumstr (p, addr);
|
p += hexnumstr (p, addr);
|
||||||
xsnprintf (p, endbuf - p, ",%d", bp_tgt->placed_size);
|
xsnprintf (p, endbuf - p, ",%d", bp_tgt->kind);
|
||||||
|
|
||||||
putpkt (rs->buf);
|
putpkt (rs->buf);
|
||||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||||
|
@ -10030,7 +10030,7 @@ remote_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||||
|
|
||||||
addr = remote_address_masked (addr);
|
addr = remote_address_masked (addr);
|
||||||
p += hexnumstr (p, (ULONGEST) addr);
|
p += hexnumstr (p, (ULONGEST) addr);
|
||||||
xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
|
xsnprintf (p, endbuf - p, ",%x", bp_tgt->kind);
|
||||||
|
|
||||||
if (remote_supports_cond_breakpoints (self))
|
if (remote_supports_cond_breakpoints (self))
|
||||||
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
|
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
|
||||||
|
@ -10084,7 +10084,7 @@ remote_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
|
||||||
|
|
||||||
addr = remote_address_masked (bp_tgt->placed_address);
|
addr = remote_address_masked (bp_tgt->placed_address);
|
||||||
p += hexnumstr (p, (ULONGEST) addr);
|
p += hexnumstr (p, (ULONGEST) addr);
|
||||||
xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
|
xsnprintf (p, endbuf - p, ",%x", bp_tgt->kind);
|
||||||
|
|
||||||
putpkt (rs->buf);
|
putpkt (rs->buf);
|
||||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue