This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch/rfc] Delete deprecated_inside_entry_file part #1 of #2


Hello,

As the various comments in the code explain, it's firstly wrong and secondly superseeded by fixes to inside main func. This finally yanks it. The follow on patch will yank the corresponding symbol table stuff.

I'll commit this part in a day or so.

Andrew
2004-04-29  Andrew Cagney  <cagney@redhat.com>

	* defs.h (deprecated_inside_entry_file): Delete declaration.
	* blockframe.c (deprecated_inside_entry_file): Delete function.
	(legacy_frame_chain_valid): Delete call.
	* sh64-tdep.c (sh64_frame_chain): Delete call.
	* objfiles.h: Update comments.
	* i386-interix-tdep.c (i386_interix_frame_chain_valid): Delete
	call.
	* frame.c (get_prev_frame): Delete call, update comments.

Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.96
diff -u -r1.96 blockframe.c
--- blockframe.c	23 Mar 2004 15:16:39 -0000	1.96
+++ blockframe.c	29 Apr 2004 14:38:07 -0000
@@ -43,34 +43,6 @@
 
 void _initialize_blockframe (void);
 
-/* Is ADDR inside the startup file?  Note that if your machine has a
-   way to detect the bottom of the stack, there is no need to call
-   this function from DEPRECATED_FRAME_CHAIN_VALID; the reason for
-   doing so is that some machines have no way of detecting bottom of
-   stack.
-
-   A PC of zero is always considered to be the bottom of the stack. */
-
-int
-deprecated_inside_entry_file (CORE_ADDR addr)
-{
-  if (addr == 0)
-    return 1;
-  if (symfile_objfile == 0)
-    return 0;
-  if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT
-      || CALL_DUMMY_LOCATION == AT_SYMBOL)
-    {
-      /* Do not stop backtracing if the pc is in the call dummy
-         at the entry point.  */
-      /* FIXME: Won't always work with zeros for the last two arguments */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (addr, 0, 0))
-	return 0;
-    }
-  return (addr >= symfile_objfile->ei.deprecated_entry_file_lowpc &&
-	  addr < symfile_objfile->ei.deprecated_entry_file_highpc);
-}
-
 /* Test whether PC is in the range of addresses that corresponds to
    the "main" function.  */
 
@@ -621,13 +593,6 @@
      isn't valid.  */
   if (legacy_inside_entry_func (get_frame_pc (fi)))
     return 0;
-
-  /* If we're inside the entry file, it isn't valid.  */
-  /* NOTE/drow 2002-12-25: should there be a way to disable this check?  It
-     assumes a single small entry file, and the way some debug readers (e.g.
-     dbxread) figure out which object is the entry file is somewhat hokey.  */
-  if (deprecated_inside_entry_file (frame_pc_unwind (fi)))
-      return 0;
 
   return 1;
 }
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.144
diff -u -r1.144 defs.h
--- defs.h	21 Apr 2004 23:52:20 -0000	1.144
+++ defs.h	29 Apr 2004 14:38:08 -0000
@@ -327,8 +327,6 @@
 
 extern int inside_entry_func (struct frame_info *this_frame);
 
-extern int deprecated_inside_entry_file (CORE_ADDR addr);
-
 extern int inside_main_func (CORE_ADDR pc);
 
 /* From utils.c */
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.173
diff -u -r1.173 frame.c
--- frame.c	26 Apr 2004 09:49:35 -0000	1.173
+++ frame.c	29 Apr 2004 14:38:08 -0000
@@ -1954,13 +1954,12 @@
      be allowed to unwind.  */
   /* NOTE: cagney/2003-02-25: Don't enable until someone has found
      hard evidence that this is needed.  */
-  /* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func() - wasn't
-     checking for "main" in the minimal symbols.  With that fixed
-     asm-source tests now stop in "main" instead of halting the
+  /* NOTE: cagney/2003-07-07: Fixed a bug in inside_main_func() -
+     wasn't checking for "main" in the minimal symbols.  With that
+     fixed asm-source tests now stop in "main" instead of halting the
      backtrace in weird and wonderful ways somewhere inside the entry
-     file.  Suspect that deprecated_inside_entry_file() and
-     inside_entry_func() tests were added to work around that (now
-     fixed) case.  */
+     file.  Suspect that tests for inside the entry file/func were
+     added to work around that (now fixed) case.  */
   /* NOTE: cagney/2003-07-15: danielj (if I'm reading it right)
      suggested having the inside_entry_func test use the
      inside_main_func() msymbol trick (along with entry_point_address()
@@ -1978,35 +1977,6 @@
       && inside_entry_func (this_frame))
     {
       frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry func");
-      return NULL;
-    }
-
-  /* If we're inside the entry file, it isn't valid.  Don't apply this
-     test to a dummy frame - dummy frame PCs typically land in the
-     entry file.  Don't apply this test to the sentinel frame.
-     Sentinel frames should always be allowed to unwind.  */
-  /* NOTE: drow/2002-12-25: should there be a way to disable this
-     check?  It assumes a single small entry file, and the way some
-     debug readers (e.g. dbxread) figure out which object is the
-     entry file is somewhat hokey.  */
-  /* NOTE: cagney/2003-01-10: If there is a way of disabling this test
-     then it should probably be moved to before the ->prev_p test,
-     above.  */
-  /* NOTE: vinschen/2003-04-01: Disabled.  It turns out that the call
-     to deprecated_inside_entry_file() destroys a meaningful backtrace
-     under some conditions, e.g. the backtrace tests in the
-     asm-source testcase are broken for some targets.  In this test
-     the functions are all implemented as part of one file and the
-     testcase is not necessarily linked with a start file (depending
-     on the target).  What happens is that the first frame is printed
-     normally and following frames are treated as being inside the
-     entry file then.  This way, only the #0 frame is printed in the
-     backtrace output.  */
-  if (0
-      && this_frame->type != DUMMY_FRAME && this_frame->level >= 0
-      && deprecated_inside_entry_file (get_frame_pc (this_frame)))
-    {
-      frame_debug_got_null_frame (gdb_stdlog, this_frame, "inside entry file");
       return NULL;
     }
 
Index: i386-interix-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-interix-tdep.c,v
retrieving revision 1.14
diff -u -r1.14 i386-interix-tdep.c
--- i386-interix-tdep.c	23 Mar 2004 14:47:56 -0000	1.14
+++ i386-interix-tdep.c	29 Apr 2004 14:38:08 -0000
@@ -126,10 +126,7 @@
      be a signal handler caller).  If we're dealing with a signal
      handler caller, this will return valid, which is fine.  If not,
      it'll make the correct test.  */
-  return ((get_frame_type (thisframe) == SIGTRAMP_FRAME)
-          || (chain != 0
-              && !deprecated_inside_entry_file (read_memory_integer
-						(thisframe->frame + 4, 4))));
+  return ((get_frame_type (thisframe) == SIGTRAMP_FRAME) || chain != 0);
 }
 
 /* We want to find the previous frame, which on Interix is tricky when
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.35
diff -u -r1.35 objfiles.h
--- objfiles.h	14 Feb 2004 15:46:33 -0000	1.35
+++ objfiles.h	29 Apr 2004 14:38:08 -0000
@@ -57,7 +57,7 @@
 
    NOTE: cagney/2003-09-09: It turns out that this "traditional"
    method doesn't work.  Corinna writes: ``It turns out that the call
-   to deprecated_inside_entry_file destroys a meaningful backtrace
+   to test for "inside entry file" destroys a meaningful backtrace
    under some conditions.  E. g. the backtrace tests in the asm-source
    testcase are broken for some targets.  In this test the functions
    are all implemented as part of one file and the testcase is not
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.25
diff -u -r1.25 sh64-tdep.c
--- sh64-tdep.c	2 Apr 2004 23:20:49 -0000	1.25
+++ sh64-tdep.c	29 Apr 2004 14:38:08 -0000
@@ -740,8 +740,7 @@
 				   get_frame_base (frame),
 				   get_frame_base (frame)))
     return get_frame_base (frame);    /* dummy frame same as caller's frame */
-  if (get_frame_pc (frame)
-      && !deprecated_inside_entry_file (get_frame_pc (frame)))
+  if (get_frame_pc (frame))
     {
       int media_mode = pc_is_isa32 (get_frame_pc (frame));
       int size;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]