* breakpoint.c (breakpoint_chain): Make static.
* breakpoint.c, breakpoint.h (frame_in_dummy): New function. * stack.c (print_frame_info): Use it.
This commit is contained in:
parent
da6b2d99f7
commit
05052b638c
3 changed files with 47 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Thu Dec 30 10:16:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* breakpoint.c (breakpoint_chain): Make static.
|
||||
* breakpoint.c, breakpoint.h (frame_in_dummy): New function.
|
||||
* stack.c (print_frame_info): Use it.
|
||||
|
||||
Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* exec.c (add_to_section_table): Check for SEC_ALLOC instead of
|
||||
|
|
|
@ -154,7 +154,7 @@ static int executing_breakpoint_commands;
|
|||
|
||||
/* Chain of all breakpoints defined. */
|
||||
|
||||
struct breakpoint *breakpoint_chain;
|
||||
static struct breakpoint *breakpoint_chain;
|
||||
|
||||
/* Number of last breakpoint made. */
|
||||
|
||||
|
@ -450,6 +450,7 @@ insert_breakpoints ()
|
|||
b->enable = disabled;
|
||||
if (!disabled_breaks)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"Cannot insert breakpoint %d:\n", b->number);
|
||||
printf_filtered ("Disabling shared library breakpoints:\n");
|
||||
|
@ -460,6 +461,7 @@ insert_breakpoints ()
|
|||
else
|
||||
#endif
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
fprintf_unfiltered (gdb_stderr, "Cannot insert breakpoint %d:\n", b->number);
|
||||
#ifdef ONE_PROCESS_WRITETEXT
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
|
@ -554,6 +556,30 @@ breakpoint_here_p (pc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Return nonzero if FRAME is a dummy frame. We can't use PC_IN_CALL_DUMMY
|
||||
because figuring out the saved SP would take too much time, at least using
|
||||
get_saved_register on the 68k. This means that for this function to
|
||||
work right a port must use the bp_call_dummy breakpoint. */
|
||||
|
||||
int
|
||||
frame_in_dummy (frame)
|
||||
FRAME frame;
|
||||
{
|
||||
struct breakpoint *b;
|
||||
|
||||
ALL_BREAKPOINTS (b)
|
||||
{
|
||||
/* We could also check whether fi->pc is within the call dummy, but
|
||||
that should not be necessary if we check the frame (note the
|
||||
call dummy is sizeof (dummy) / sizeof (LONGEST) * REGISTER_SIZE
|
||||
bytes not just sizeof (dummy) bytes). */
|
||||
if (b->type == bp_call_dummy
|
||||
&& b->frame == frame->frame)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* breakpoint_match_thread (PC, PID) returns true if the breakpoint at PC
|
||||
is valid for process/thread PID. */
|
||||
|
||||
|
@ -2619,6 +2645,7 @@ delete_breakpoint (bpt)
|
|||
val = target_insert_breakpoint (b->address, b->shadow_contents);
|
||||
if (val != 0)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
fprintf_unfiltered (gdb_stderr, "Cannot insert breakpoint %d:\n", b->number);
|
||||
memory_error (val, b->address); /* which bombs us out */
|
||||
}
|
||||
|
@ -2640,10 +2667,14 @@ delete_breakpoint (bpt)
|
|||
free (bpt->source_file);
|
||||
|
||||
if (xgdb_verbose && bpt->type == bp_breakpoint)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
printf_unfiltered ("breakpoint #%d deleted\n", bpt->number);
|
||||
}
|
||||
|
||||
/* Be sure no bpstat's are pointing at it after it's been freed. */
|
||||
/* FIXME, how can we find all bpstat's? We just check stop_bpstat for now. */
|
||||
/* FIXME, how can we find all bpstat's?
|
||||
We just check stop_bpstat for now. */
|
||||
for (bs = stop_bpstat; bs; bs = bs->next)
|
||||
if (bs->breakpoint_at == bpt)
|
||||
bs->breakpoint_at = NULL;
|
||||
|
|
|
@ -185,6 +185,9 @@ print_frame_info (fi, level, source, args)
|
|||
char buf[MAX_REGISTER_RAW_SIZE];
|
||||
CORE_ADDR sp;
|
||||
|
||||
#if 0
|
||||
/* On the 68k, this spends too much time in m68k_find_saved_regs. */
|
||||
|
||||
/* Get the value of SP_REGNUM relative to the frame. */
|
||||
get_saved_register (buf, (int *)NULL, (CORE_ADDR *)NULL,
|
||||
FRAME_INFO_ID (fi), SP_REGNUM, (enum lval_type *)NULL);
|
||||
|
@ -195,6 +198,9 @@ print_frame_info (fi, level, source, args)
|
|||
will succeed even though there is no call dummy. Probably best is
|
||||
to check for a bp_call_dummy breakpoint. */
|
||||
if (PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
|
||||
#else
|
||||
if (frame_in_dummy (fi))
|
||||
#endif
|
||||
{
|
||||
/* Do this regardless of SOURCE because we don't have any source
|
||||
to list for this frame. */
|
||||
|
@ -280,7 +286,7 @@ print_frame_info (fi, level, source, args)
|
|||
if (fi->pc != sal.pc || !sal.symtab)
|
||||
printf_filtered ("%s in ", local_hex_string((unsigned long) fi->pc));
|
||||
fprintf_symbol_filtered (gdb_stdout, funname ? funname : "??", funlang,
|
||||
DMGL_NO_OPTS);
|
||||
DMGL_ANSI);
|
||||
wrap_here (" ");
|
||||
fputs_filtered (" (", gdb_stdout);
|
||||
if (args)
|
||||
|
|
Loading…
Reference in a new issue