* breakpoint.c (adjust_breakpoint_address): Don't adjust
breakpoint address for watchpoints or the catch eventpoints. Add new paramter ``bptype''. Adjust all callers.
This commit is contained in:
parent
9992270f89
commit
88f7da0511
2 changed files with 29 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-03-19 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
|
* breakpoint.c (adjust_breakpoint_address): Don't adjust
|
||||||
|
breakpoint address for watchpoints or the catch eventpoints.
|
||||||
|
Add new paramter ``bptype''. Adjust all callers.
|
||||||
|
|
||||||
2004-03-19 Andrew Cagney <cagney@redhat.com>
|
2004-03-19 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* config/pa/tm-hppa.h (GDB_TARGET_IS_HPPA): Delete unused macro.
|
* config/pa/tm-hppa.h (GDB_TARGET_IS_HPPA): Delete unused macro.
|
||||||
|
|
|
@ -99,7 +99,8 @@ static void check_duplicates (struct breakpoint *);
|
||||||
|
|
||||||
static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
|
static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
|
||||||
|
|
||||||
static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr);
|
static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr,
|
||||||
|
enum bptype bptype);
|
||||||
|
|
||||||
static void describe_other_breakpoints (CORE_ADDR, asection *);
|
static void describe_other_breakpoints (CORE_ADDR, asection *);
|
||||||
|
|
||||||
|
@ -3947,13 +3948,25 @@ breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
|
||||||
this function is simply the identity function. */
|
this function is simply the identity function. */
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
adjust_breakpoint_address (CORE_ADDR bpaddr)
|
adjust_breakpoint_address (CORE_ADDR bpaddr, enum bptype bptype)
|
||||||
{
|
{
|
||||||
if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch))
|
if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch))
|
||||||
{
|
{
|
||||||
/* Very few targets need any kind of breakpoint adjustment. */
|
/* Very few targets need any kind of breakpoint adjustment. */
|
||||||
return bpaddr;
|
return bpaddr;
|
||||||
}
|
}
|
||||||
|
else if (bptype == bp_watchpoint
|
||||||
|
|| bptype == bp_hardware_watchpoint
|
||||||
|
|| bptype == bp_read_watchpoint
|
||||||
|
|| bptype == bp_access_watchpoint
|
||||||
|
|| bptype == bp_catch_fork
|
||||||
|
|| bptype == bp_catch_vfork
|
||||||
|
|| bptype == bp_catch_exec)
|
||||||
|
{
|
||||||
|
/* Watchpoints and the various bp_catch_* eventpoints should not
|
||||||
|
have their addresses modified. */
|
||||||
|
return bpaddr;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CORE_ADDR adjusted_bpaddr;
|
CORE_ADDR adjusted_bpaddr;
|
||||||
|
@ -4062,7 +4075,8 @@ set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
|
||||||
memset (b, 0, sizeof (*b));
|
memset (b, 0, sizeof (*b));
|
||||||
b->loc = allocate_bp_location (b, bptype);
|
b->loc = allocate_bp_location (b, bptype);
|
||||||
b->loc->requested_address = sal.pc;
|
b->loc->requested_address = sal.pc;
|
||||||
b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
|
b->loc->address = adjust_breakpoint_address (b->loc->requested_address,
|
||||||
|
bptype);
|
||||||
if (sal.symtab == NULL)
|
if (sal.symtab == NULL)
|
||||||
b->source_file = NULL;
|
b->source_file = NULL;
|
||||||
else
|
else
|
||||||
|
@ -4622,7 +4636,8 @@ set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id)
|
||||||
if (b->type == bp_longjmp_resume)
|
if (b->type == bp_longjmp_resume)
|
||||||
{
|
{
|
||||||
b->loc->requested_address = pc;
|
b->loc->requested_address = pc;
|
||||||
b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
|
b->loc->address = adjust_breakpoint_address (b->loc->requested_address,
|
||||||
|
b->type);
|
||||||
b->enable_state = bp_enabled;
|
b->enable_state = bp_enabled;
|
||||||
b->frame_id = frame_id;
|
b->frame_id = frame_id;
|
||||||
check_duplicates (b);
|
check_duplicates (b);
|
||||||
|
@ -5879,7 +5894,8 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
|
||||||
scope_breakpoint->loc->requested_address
|
scope_breakpoint->loc->requested_address
|
||||||
= get_frame_pc (prev_frame);
|
= get_frame_pc (prev_frame);
|
||||||
scope_breakpoint->loc->address
|
scope_breakpoint->loc->address
|
||||||
= adjust_breakpoint_address (scope_breakpoint->loc->requested_address);
|
= adjust_breakpoint_address (scope_breakpoint->loc->requested_address,
|
||||||
|
scope_breakpoint->type);
|
||||||
|
|
||||||
/* The scope breakpoint is related to the watchpoint. We
|
/* The scope breakpoint is related to the watchpoint. We
|
||||||
will need to act on them together. */
|
will need to act on them together. */
|
||||||
|
@ -7185,7 +7201,8 @@ breakpoint_re_set_one (void *bint)
|
||||||
b->line_number = sals.sals[i].line;
|
b->line_number = sals.sals[i].line;
|
||||||
b->loc->requested_address = sals.sals[i].pc;
|
b->loc->requested_address = sals.sals[i].pc;
|
||||||
b->loc->address
|
b->loc->address
|
||||||
= adjust_breakpoint_address (b->loc->requested_address);
|
= adjust_breakpoint_address (b->loc->requested_address,
|
||||||
|
b->type);
|
||||||
|
|
||||||
/* Used to check for duplicates here, but that can
|
/* Used to check for duplicates here, but that can
|
||||||
cause trouble, as it doesn't check for disabled
|
cause trouble, as it doesn't check for disabled
|
||||||
|
|
Loading…
Add table
Reference in a new issue