#include "exceptions.h"
#include "memattr.h"
#include "ada-lang.h"
+#include "top.h"
#include "gdb-events.h"
#include "mi/mi-common.h"
if (val)
{
/* Can't set the breakpoint. */
- if (
-#if defined (DISABLE_UNSETTABLE_BREAK)
- DISABLE_UNSETTABLE_BREAK (bpt->address)
-#else
- solib_address (bpt->address)
-#endif
- )
+ if (solib_address (bpt->address))
{
/* See also: disable_breakpoints_in_shlibs. */
val = 0;
on this target, we may not be able to stop when the vfork is
seen, but only when the subsequent exec is seen. (And because
deleting fork catchpoints here but not vfork catchpoints will
- seem mysterious to users, keep those too.)
-
- ??rehrauer: Let's hope that merely clearing out this catchpoint's
- target address field, if any, is sufficient to have it be reset
- automagically. Certainly on HP-UX that's true.
-
- Jim Blandy <jimb@redhat.com>: Actually, zero is a perfectly
- valid code address on some platforms (like the mn10300
- simulators). We shouldn't assign any special interpretation to
- a breakpoint with a zero address. And in fact, GDB doesn't ---
- I can't see what that comment above is talking about. As far
- as I can tell, setting the address of a
- bp_catch_exec/bp_catch_vfork/bp_catch_fork breakpoint to zero
- is meaningless, since those are implemented with HP-UX kernel
- hackery, not by storing breakpoint instructions somewhere. */
+ seem mysterious to users, keep those too.) */
if ((b->type == bp_catch_exec) ||
(b->type == bp_catch_vfork) ||
(b->type == bp_catch_fork))
{
- b->loc->address = (CORE_ADDR) 0;
continue;
}
delete_breakpoint (b);
continue;
}
-
- /* If this breakpoint has survived the above battery of checks, then
- it must have a symbolic address. Be sure that it gets reevaluated
- to a target address, rather than reusing the old evaluation.
-
- Jim Blandy <jimb@redhat.com>: As explained above in the comment
- for bp_catch_exec and friends, I'm pretty sure this is entirely
- unnecessary. A call to breakpoint_re_set_one always recomputes
- the breakpoint's address from scratch, or deletes it if it can't.
- So I think this assignment could be deleted without effect. */
- b->loc->address = (CORE_ADDR) 0;
}
/* FIXME what about longjmp breakpoints? Re-create them here? */
create_overlay_event_breakpoint ("_ovly_debug_event");
/* Likewise for watchpoints on local expressions. */
if (b->exp_valid_block != NULL)
delete_breakpoint (b);
- if (context == inf_starting)
+ else if (context == inf_starting)
{
/* Reset val field to force reread of starting value
in insert_breakpoints. */
/* 2 */
annotate_field (1);
- if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0])))
+ if (((int) b->type >= (sizeof (bptypes) / sizeof (bptypes[0])))
|| ((int) b->type != bptypes[(int) b->type].type))
internal_error (__FILE__, __LINE__,
_("bptypes table does not describe type #%d."),
{
/* Compare against (CORE_ADDR)-1 in case some compiler decides
that a comparison of an unsigned with -1 is always false. */
- if (last_addr != (CORE_ADDR) -1)
+ if (last_addr != (CORE_ADDR) -1 && !server_command)
set_next_address (last_addr);
}
apply to enabled breakpoints, disabled ones can just stay disabled. */
void
-disable_breakpoints_in_shlibs (int silent)
+disable_breakpoints_in_shlibs (void)
{
struct breakpoint *b;
int disabled_shlib_breaks = 0;
- /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
ALL_BREAKPOINTS (b)
{
if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint))
&& solib_address (b->loc->address)
#endif
)
- {
b->enable_state = bp_shlib_disabled;
- if (!silent)
- {
- if (!disabled_shlib_breaks)
- {
- target_terminal_ours_for_output ();
- warning (_("Temporarily disabling shared library breakpoints:"));
- }
- disabled_shlib_breaks = 1;
- warning (_("breakpoint #%d "), b->number);
- }
- }
}
}
struct breakpoint *b;
int disabled_shlib_breaks = 0;
- /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
ALL_BREAKPOINTS (b)
{
if ((b->loc->loc_type == bp_loc_hardware_breakpoint
address and file/line number respectively.\n\
\n\
Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed.\n\n\
+are set to the address of the last breakpoint listed unless the command\n\
+is prefixed with \"server \".\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set."));
}
address and file/line number respectively.\n\
\n\
Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed.\n\n\
+are set to the address of the last breakpoint listed unless the command\n\
+is prefixed with \"server \".\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set."));
address and file/line number respectively.\n\
\n\
Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed.\n\n\
+are set to the address of the last breakpoint listed unless the command\n\
+is prefixed with \"server \".\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set."));
address and file/line number respectively.\n\
\n\
Convenience variable \"$_\" and default examine address for \"x\"\n\
-are set to the address of the last breakpoint listed.\n\
-\n\
+are set to the address of the last breakpoint listed unless the command\n\
+is prefixed with \"server \".\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set."),
&maintenanceinfolist);