Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: Jim Blandy <jimb@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] partial-stab.h patch amendment
Date: Thu, 06 Sep 2001 13:56:00 -0000	[thread overview]
Message-ID: <1010906205537.ZM8109@ocotillo.lan> (raw)
In-Reply-To: <npheugkyqo.fsf@zwingli.cygnus.com>

On Sep 6, 12:36pm, Jim Blandy wrote:

> These patches are approved as amended.

Committed.  (Thanks.)

> (When I say things like that I feel like I should break out a copy of
> Robert's Rules or something.)

Let the record show that the following patch was committed:

	* dbxread.c (process_one_symbol): Don't use error result from
	find_stab_function_addr().
	* partial-stab.h (case 'F'): Likewise.

	* partial-stab.h (case 'f'): Make SOFUN_ADDRESS_MAYBE_MISSING
	code match that used for case 'F'.  This fixes the divergence
	that was introduced by my 1999-09-14 changes to partial-stab.h.

Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.22
diff -u -p -r1.22 dbxread.c
--- dbxread.c	2001/09/05 02:54:15	1.22
+++ dbxread.c	2001/09/06 20:34:35
@@ -2266,8 +2266,18 @@ process_one_symbol (int type, int desc, 
 	         from N_FUN symbols.  */
 	      if (type == N_FUN
 		  && valu == ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)))
-		valu = 
-		  find_stab_function_addr (name, last_source_file, objfile);
+		{
+		  CORE_ADDR minsym_valu = 
+		    find_stab_function_addr (name, last_source_file, objfile);
+
+		  /* find_stab_function_addr will return 0 if the minimal
+		     symbol wasn't found.  (Unfortunately, this might also
+		     be a valid address.)  Anyway, if it *does* return 0,
+		     it is likely that the value was set correctly to begin
+		     with... */
+		  if (minsym_valu != 0)
+		    valu = minsym_valu;
+		}
 #endif
 
 #ifdef SUN_FIXED_LBRAC_BUG
Index: partial-stab.h
===================================================================
RCS file: /cvs/src/src/gdb/partial-stab.h,v
retrieving revision 1.12
diff -u -p -r1.12 partial-stab.h
--- partial-stab.h	2001/08/15 05:02:28	1.12
+++ partial-stab.h	2001/09/06 20:34:36
@@ -595,10 +595,22 @@ switch (CUR_SYMBOL_TYPE)
 #ifdef SOFUN_ADDRESS_MAYBE_MISSING
 	/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
 	   value for the bottom of the text seg in those cases. */
-	if (pst && textlow_not_set)
+	if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets, 
+	                                  SECT_OFF_TEXT (objfile)))
 	  {
-	    pst->textlow =
+	    CORE_ADDR minsym_valu = 
 	      find_stab_function_addr (namestring, pst->filename, objfile);
+	    /* find_stab_function_addr will return 0 if the minimal
+	       symbol wasn't found.  (Unfortunately, this might also
+	       be a valid address.)  Anyway, if it *does* return 0,
+	       it is likely that the value was set correctly to begin
+	       with... */
+	    if (minsym_valu != 0)
+	      CUR_SYMBOL_VALUE = minsym_valu;
+	  }
+	if (pst && textlow_not_set)
+	  {
+	    pst->textlow = CUR_SYMBOL_VALUE;
 	    textlow_not_set = 0;
 	  }
 #endif
@@ -652,8 +664,17 @@ switch (CUR_SYMBOL_TYPE)
 	   value for the bottom of the text seg in those cases. */
 	if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets, 
 	                                  SECT_OFF_TEXT (objfile)))
-	  CUR_SYMBOL_VALUE = 
-	    find_stab_function_addr (namestring, pst->filename, objfile);
+	  {
+	    CORE_ADDR minsym_valu = 
+	      find_stab_function_addr (namestring, pst->filename, objfile);
+	    /* find_stab_function_addr will return 0 if the minimal
+	       symbol wasn't found.  (Unfortunately, this might also
+	       be a valid address.)  Anyway, if it *does* return 0,
+	       it is likely that the value was set correctly to begin
+	       with... */
+	    if (minsym_valu != 0)
+	      CUR_SYMBOL_VALUE = minsym_valu;
+	  }
 	if (pst && textlow_not_set)
 	  {
 	    pst->textlow = CUR_SYMBOL_VALUE;


  reply	other threads:[~2001-09-06 13:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-05 15:43 Kevin Buettner
2001-09-05 16:00 ` Kevin Buettner
2001-09-06 10:35 ` Jim Blandy
2001-09-06 13:56   ` Kevin Buettner [this message]
     [not found]     ` <1010906232048.ZM8395@ocotillo.lan>
2001-09-06 23:00       ` H . J . Lu
2001-09-07  9:53         ` Kevin Buettner
2001-09-07 10:02           ` H . J . Lu
2001-09-07 10:31           ` Andrew Cagney
2001-09-07 10:42             ` Elena Zannoni
2001-09-07 14:16             ` Jim Blandy
2001-10-03 18:21             ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010906205537.ZM8109@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox