diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-11-24 03:20:09 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-11-24 03:20:09 +0000 |
commit | 0225421b7c765bc999684513699ff324bdd3cf02 (patch) | |
tree | 54de6f2bc9509dd8987ebb5504495eedce68b792 /gdb | |
parent | 86a2cbee551cf89e4c87d48092733065a2a2ef11 (diff) | |
download | gdb-0225421b7c765bc999684513699ff324bdd3cf02.zip gdb-0225421b7c765bc999684513699ff324bdd3cf02.tar.gz gdb-0225421b7c765bc999684513699ff324bdd3cf02.tar.bz2 |
2002-11-23 Andrew Cagney <ac131313@redhat.com>
* breakpoint.c: Include "gdb_assert.h".
(deprecated_frame_in_dummy): Assert that generic dummy frames are
not being used.
* Makefile.in (breakpoint.o): Update dependencies.
* ada-lang.c (find_printable_frame): Use get_frame_type instead of
deprecated_frame_in_dummy.
* stack.c (print_frame_info_base): Ditto.
(frame_info): Ditto.
(print_frame_info_base): Ditto. Delete dead code.
Index: tui/ChangeLog
2002-11-23 Andrew Cagney <ac131313@redhat.com>
* tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of
deprecated_frame_in_dummy. Fix coding style.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/ada-lang.c | 2 | ||||
-rw-r--r-- | gdb/breakpoint.c | 7 | ||||
-rw-r--r-- | gdb/stack.c | 24 | ||||
-rw-r--r-- | gdb/tui/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tuiStack.c | 6 |
7 files changed, 30 insertions, 28 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9ae9123..1104cf2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2002-11-23 Andrew Cagney <ac131313@redhat.com> + + * breakpoint.c: Include "gdb_assert.h". + (deprecated_frame_in_dummy): Assert that generic dummy frames are + not being used. + * Makefile.in (breakpoint.o): Update dependencies. + * ada-lang.c (find_printable_frame): Use get_frame_type instead of + deprecated_frame_in_dummy. + * stack.c (print_frame_info_base): Ditto. + (frame_info): Ditto. + (print_frame_info_base): Ditto. Delete dead code. + 2002-11-23 Andreas Schwab <schwab@suse.de> * Makefile.in (m68k_tdep_h): Define. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 1b2b47c..cb4af24 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1571,7 +1571,7 @@ breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ $(objfiles_h) $(linespec_h) $(completer_h) $(gdb_h) $(ui_out_h) \ - $(cli_script_h) $(gdb_events_h) $(source_h) + $(cli_script_h) $(gdb_events_h) $(source_h) $(gdb_assert_h) buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c21a325..e83037a 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5045,7 +5045,7 @@ find_printable_frame (struct frame_info *fi, int level) find_pc_line (fi->pc, fi->next != NULL && !(get_frame_type (fi->next) == SIGTRAMP_FRAME) - && !deprecated_frame_in_dummy (fi->next)); + && !(get_frame_type (fi->next) == DUMMY_FRAME)); if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename)) { #if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 9fc7bdb..d8b1239 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -47,6 +47,7 @@ #include "gdb.h" #include "ui-out.h" #include "cli/cli-script.h" +#include "gdb_assert.h" #include "gdb-events.h" @@ -1695,8 +1696,10 @@ deprecated_frame_in_dummy (struct frame_info *frame) if (!CALL_DUMMY_P) return 0; - if (USE_GENERIC_DUMMY_FRAMES) - return generic_pc_in_call_dummy (frame->pc, frame->frame, frame->frame); + /* This function is used by two files: get_frame_type(), after first + checking that !USE_GENERIC_DUMMY_FRAMES; and sparc-tdep.c, which + doesn't yet use generic dummy frames anyway. */ + gdb_assert (!USE_GENERIC_DUMMY_FRAMES); ALL_BREAKPOINTS (b) { diff --git a/gdb/stack.c b/gdb/stack.c index aee7679..a373126 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -317,25 +317,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args) int source_print; int location_print; -#if 0 - char buf[MAX_REGISTER_RAW_SIZE]; - CORE_ADDR sp; - - /* 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); - sp = extract_address (buf, REGISTER_RAW_SIZE (SP_REGNUM)); - - /* This is not a perfect test, because if a function alloca's some - memory, puts some code there, and then jumps into it, then the test - 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 (deprecated_frame_in_dummy (fi)) -#endif + if (get_frame_type (fi) == DUMMY_FRAME) { annotate_frame_begin (level == -1 ? 0 : level, fi->pc); @@ -378,7 +360,7 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args) find_pc_line (fi->pc, fi->next != NULL && !(get_frame_type (fi->next) == SIGTRAMP_FRAME) - && !deprecated_frame_in_dummy (fi->next)); + && !(get_frame_type (fi->next) == DUMMY_FRAME)); location_print = (source == LOCATION || source == LOC_AND_ADDRESS @@ -778,7 +760,7 @@ frame_info (char *addr_exp, int from_tty) sal = find_pc_line (fi->pc, fi->next != NULL && !(get_frame_type (fi->next) == SIGTRAMP_FRAME) - && !deprecated_frame_in_dummy (fi->next)); + && !(get_frame_type (fi->next) == DUMMY_FRAME)); func = get_frame_function (fi); s = find_pc_symtab (fi->pc); if (func) diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 2ed06f3..3c72765 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,3 +1,8 @@ +2002-11-23 Andrew Cagney <ac131313@redhat.com> + + * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of + deprecated_frame_in_dummy. Fix coding style. + 2002-11-21 Stephane Carrez <stcarrez@nerim.fr> * tui-hooks.c (tui_init_hook): Don't enable the TUI if a specific diff --git a/gdb/tui/tuiStack.c b/gdb/tui/tuiStack.c index 333d95f..7f46d57 100644 --- a/gdb/tui/tuiStack.c +++ b/gdb/tui/tuiStack.c @@ -350,9 +350,9 @@ tuiShowFrameInfo (struct frame_info *fi) struct symtab_and_line sal; sal = find_pc_line (fi->pc, - (fi->next != (struct frame_info *) NULL && - !(get_frame_type (fi->next) == SIGTRAMP_FRAME) && - !deprecated_frame_in_dummy (fi->next))); + (fi->next != (struct frame_info *) NULL + && !(get_frame_type (fi->next) == SIGTRAMP_FRAME) + && !(get_frame_type (fi->next) == DUMMY_FRAME))); sourceAlreadyDisplayed = sal.symtab != 0 && tuiSourceIsDisplayed (sal.symtab->filename); |