* objfiles.h: Delete comments refering to inside_entry_func and
authorDaniel Jacobowitz <drow@false.org>
Wed, 4 Feb 2004 16:34:51 +0000 (16:34 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 4 Feb 2004 16:34:51 +0000 (16:34 +0000)
DEPRECATED_FRAME_CHAIN_VALID.
* defs.h (inside_entry_func): Update prototype..
* blockframe.c (inside_entry_func): Rename to
legacy_inside_entry_func.  Add new inside_entry_func taking a frame.
* frame.c (get_prev_frame): Pass the frame to inside_entry_func.

gdb/ChangeLog
gdb/blockframe.c
gdb/defs.h
gdb/frame.c
gdb/objfiles.h

index 535ba2e48fa0e026ecda6fab95e53040d5da625e..d39114a729968cbf27dd052062bccbc517e666bc 100644 (file)
@@ -1,3 +1,13 @@
+2004-02-04  Andrew Cagney  <cagney@redhat.com>
+           Daniel Jacobowitz  <drow@mvista.com>
+
+       * objfiles.h: Delete comments refering to inside_entry_func and
+       DEPRECATED_FRAME_CHAIN_VALID.
+       * defs.h (inside_entry_func): Update prototype..
+       * blockframe.c (inside_entry_func): Rename to
+       legacy_inside_entry_func.  Add new inside_entry_func taking a frame.
+       * frame.c (get_prev_frame): Pass the frame to inside_entry_func.
+
 2004-02-03  Jeff Johnston  <jjohnstn@redhat.com>
 
        * breakpoint.c (struct captured_parse_breakpoint_args):  Move
index 4a7a380023ff37f6074550fadf7f0ec5649f6e38..00d7d8f13e473680f362c999e0f5e532971c6e7d 100644 (file)
@@ -156,11 +156,18 @@ inside_main_func (CORE_ADDR pc)
          && symfile_objfile->ei.main_func_highpc > pc);
 }
 
-/* Test whether PC is inside the range of addresses that corresponds
-   to the process entry point function.  */
+/* Test whether THIS_FRAME is inside the process entry point function.  */
 
 int
-inside_entry_func (CORE_ADDR pc)
+inside_entry_func (struct frame_info *this_frame)
+{
+  return (get_frame_func (this_frame) == entry_point_address ());
+}
+
+/* Similar to inside_entry_func, but accomodating legacy frame code.  */
+
+static int
+legacy_inside_entry_func (CORE_ADDR pc)
 {
   if (symfile_objfile == 0)
     return 0;
@@ -604,7 +611,7 @@ legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
 
   /* If we're already inside the entry function for the main objfile, then it
      isn't valid.  */
-  if (inside_entry_func (get_frame_pc (fi)))
+  if (legacy_inside_entry_func (get_frame_pc (fi)))
     return 0;
 
   /* If we're inside the entry file, it isn't valid.  */
index 43316e5d3888ab99bc0f8ffbf9a1a4af9ce90baa..0702bba423d175ae0df9ce43bcc98eb10ea309ad 100644 (file)
@@ -324,10 +324,11 @@ struct cleanup
 
 struct symtab;
 struct breakpoint;
+struct frame_info;
 
 /* From blockframe.c */
 
-extern int inside_entry_func (CORE_ADDR);
+extern int inside_entry_func (struct frame_info *this_frame);
 
 extern int deprecated_inside_entry_file (CORE_ADDR addr);
 
@@ -656,8 +657,6 @@ enum lval_type
     lval_reg_frame_relative
   };
 
-struct frame_info;
-
 /* Control types for commands */
 
 enum misc_command_type
index a7da9196b0f222147c339fbb771a0d6109709f7d..6c2a29f89d26b8bf9cfba9000078d75b20382e00 100644 (file)
@@ -1838,7 +1838,7 @@ get_prev_frame (struct frame_info *this_frame)
       && backtrace_beyond_entry_func
 #endif
       && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
-      && inside_entry_func (get_frame_pc (this_frame)))
+      && inside_entry_func (this_frame))
     {
       if (frame_debug)
        {
index 732af4d3d010288f16838c46735b4bb10f63cd05..aeb5892b38142eda4808bc9f9911f8d1e9bd0e12 100644 (file)
@@ -98,18 +98,7 @@ struct objfile_data;
    use the block at main, or can't find it for some reason, everything
    still works as before.  And if we have no startup code debugging
    information but we do have usable information for main(), backtraces
-   from user code don't go wandering off into the startup code.
-
-   To use this method, define your DEPRECATED_FRAME_CHAIN_VALID macro
-   like:
-
-   #define DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)     \
-   (chain != 0                                   \
-   && !(inside_main_func ((thisframe)->pc))     \
-   && !(inside_entry_func ((thisframe)->pc)))
-
-   and add initializations of the four scope controlling variables inside
-   the object file / debugging information processing modules.  */
+   from user code don't go wandering off into the startup code.  */
 
 struct entry_info
   {
This page took 0.036348 seconds and 4 git commands to generate.