if (b->number == bnum)
{
if (from_tty && input_from_terminal_p ())
- {
- printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
+ printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\
End with a line saying just \"end\".\n", bnum);
- fflush (stdout);
- }
l = read_command_lines ();
free_command_lines (&b->commands);
b->commands = l;
bptlen -= (membpt + bptlen) - (memaddr + len);
}
- (void) memcpy (myaddr + membpt - memaddr,
- b->shadow_contents + bptoffset, bptlen);
+ memcpy (myaddr + membpt - memaddr,
+ b->shadow_contents + bptoffset, bptlen);
if (membpt > memaddr)
{
for (; bs != NULL; bs = bs->next)
{
tmp = (bpstat) xmalloc (sizeof (*tmp));
- (void) memcpy (tmp, bs, sizeof (*tmp));
+ memcpy (tmp, bs, sizeof (*tmp));
if (p == NULL)
/* This is the first thing in the chain. */
retval = tmp;
breakpoint_1 (bnum, 0);
}
+#if MAINTENANCE_CMDS
+
/* ARGSUSED */
static void
-all_breakpoints_info (bnum_exp, from_tty)
+maintenance_info_breakpoints (bnum_exp, from_tty)
char *bnum_exp;
int from_tty;
{
breakpoint_1 (bnum, 1);
}
+#endif
+
/* Print a message describing any breakpoints set at PC. */
static void
register struct breakpoint *b, *b1;
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
- (void) memset (b, 0, sizeof (*b));
+ memset (b, 0, sizeof (*b));
b->address = sal.pc;
b->symtab = sal.symtab;
b->line_number = sal.line;
ALL_BREAKPOINTS (b)
if (b->type == bp_longjmp)
- b->enable = enabled;
+ {
+ b->enable = enabled;
+ check_duplicates (b->address);
+ }
}
void
register struct breakpoint *b;
ALL_BREAKPOINTS (b)
- if (b->type == bp_longjmp
+ if ( b->type == bp_longjmp
|| b->type == bp_longjmp_resume)
- b->enable = disabled;
+ {
+ b->enable = disabled;
+ check_duplicates (b->address);
+ }
}
/* Call this after hitting the longjmp() breakpoint. Use this to set a new
b->frame = FRAME_FP(frame);
else
b->frame = 0;
+ check_duplicates (b->address);
return;
}
}
bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
blocks_searched = (char *) alloca (BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
- (void) memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
+ memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
while (block != 0)
{
static char message1[] = "Error in re-setting breakpoint %d:\n";
char message[sizeof (message1) + 30 /* slop */];
+ /* If we have no current source symtab, and we have any breakpoints,
+ go through the work of making a source context. */
+ if (current_source_symtab == NULL)
+ {
+ ALL_BREAKPOINTS (b)
+ {
+ select_source_symtab (NULL);
+ break; /* We only care if there are any, and
+ don't need to do it N times. */
+ }
+ }
+
ALL_BREAKPOINTS_SAFE (b, temp)
{
sprintf (message, message1, b->number); /* Format possible error msg */
- (void) catch_errors (breakpoint_re_set_one, (char *) b, message);
+ catch_errors (breakpoint_re_set_one, (char *) b, message);
}
create_longjmp_breakpoint("longjmp");
return sals;
}
\f
-
-/* Chain containing all defined enable commands. */
-
-extern struct cmd_list_element
- *enablelist, *disablelist,
- *deletelist, *enablebreaklist;
-
-extern struct cmd_list_element *cmdlist;
-
void
_initialize_breakpoint ()
{
Convenience variable \"$bpnum\" contains the number of the last\n\
breakpoint set.");
- add_info ("all-breakpoints", all_breakpoints_info,
+#if MAINTENANCE_CMDS
+
+ add_cmd ("breakpoints", class_maintenance, maintenance_info_breakpoints,
"Status of all breakpoints, or breakpoint number NUMBER.\n\
The \"Type\" column indicates one of:\n\
\tbreakpoint - normal breakpoint\n\
Convenience variable \"$_\" and default examine address for \"x\"\n\
are set to the address of the last breakpoint listed.\n\n\
Convenience variable \"$bpnum\" contains the number of the last\n\
-breakpoint set.");
+breakpoint set.",
+ &maintenanceinfolist);
+
+#endif /* MAINTENANCE_CMDS */
add_com ("catch", class_breakpoint, catch_command,
"Set breakpoints to catch exceptions that are raised.\n\
"Synonym for ``info breakpoints''.");
}
-#ifdef IBM6000_HOST
+#ifdef IBM6000_TARGET
/* Where should this function go? It is used by AIX only. FIXME. */
/* Breakpoint address relocation used to be done in breakpoint_re_set(). That
CORE_ADDR delta;
{
struct breakpoint *b;
- extern struct breakpoint *breakpoint_chain;
ALL_BREAKPOINTS (b)
{