public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Brad Lucier <lucier@math.purdue.edu>
To: binutils@sourceware.cygnus.com
Cc: lucier@math.purdue.edu, staff@math.purdue.edu,
	wilker@math.purdue.edu, hosking@cs.purdue.edu
Subject: more binutils fixes for alpha
Date: Thu, 09 Sep 1999 08:20:00 -0000	[thread overview]
Message-ID: <199909091519.KAA24865@polya.math.purdue.edu> (raw)

In binutils-2.9.5.0.7 compiled with gcc-2.95.1, gprof was dumping core.
I decided to fix the 64-bit uncleanliness of the code.  Now gprof works;
I don't know what fixed it, or why this should fix it, but here are the
diffs.

Brad Lucier     lucier@math.purdue.edu

===================================================================
RCS file: RCS/readelf.c,v
retrieving revision 1.1
diff -c -r1.1 readelf.c
*** /tmp/T0a0064B	Thu Sep  9 10:14:14 1999
--- readelf.c	Thu Sep  9 09:55:03 1999
***************
*** 3249,3256 ****
  
  				  nn += printf ("(%s%-*s",
  						strtab + ivna.vna_name,
! 						12 - strlen (strtab
! 							     + ivna.vna_name),
  						")");
  				  break;
  				}
--- 3249,3256 ----
  
  				  nn += printf ("(%s%-*s",
  						strtab + ivna.vna_name,
! 						(int) (12 - strlen (strtab
! 							     + ivna.vna_name)),
  						")");
  				  break;
  				}
***************
*** 3296,3304 ****
  					  nn +=
  					    printf ("(%s%-*s",
  						    strtab + ivda.vda_name,
! 						    12
  						    - strlen (strtab
! 							      + ivda.vda_name),
  						    ")");
  					}
  				    }
--- 3296,3304 ----
  					  nn +=
  					    printf ("(%s%-*s",
  						    strtab + ivda.vda_name,
! 						    (int) (12
  						    - strlen (strtab
! 							      + ivda.vda_name)),
  						    ")");
  					}
  				    }
***************
*** 3351,3358 ****
  
  				  nn += printf ("(%s%-*s",
  						strtab + ivna.vna_name,
! 						12 - strlen (strtab
! 							     + ivna.vna_name),
  						")");
  				  break;
  				}
--- 3351,3358 ----
  
  				  nn += printf ("(%s%-*s",
  						strtab + ivna.vna_name,
! 						(int)(12 - strlen (strtab
! 							     + ivna.vna_name)),
  						")");
  				  break;
  				}
***************
*** 3396,3403 ****
  
  			      nn += printf ("(%s%-*s",
  					    strtab + ivda.vda_name,
! 					    12 - strlen (strtab
! 							 + ivda.vda_name),
  					    ")");
  			    }
  			}
--- 3396,3403 ----
  
  			      nn += printf ("(%s%-*s",
  					    strtab + ivda.vda_name,
! 					    (int) (12 - strlen (strtab
! 							 + ivda.vda_name)),
  					    ")");
  			    }
  			}
***************
*** 5959,5965 ****
        GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),
  		      elib, Elf32_External_Lib *, "liblist");
  
!       printf ("\nSection '.liblist' contains %d entries:\n", liblistno);
        fputs ("     Library              Time Stamp          Checksum   Version Flags\n",
  	     stdout);
  
--- 5959,5965 ----
        GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),
  		      elib, Elf32_External_Lib *, "liblist");
  
!       printf ("\nSection '.liblist' contains %d entries:\n", (int) liblistno);
        fputs ("     Library              Time Stamp          Checksum   Version Flags\n",
  	     stdout);
  
***************
*** 5977,5983 ****
  
  	  strftime (timebuf, 20, "%Y-%m-%dT%H:%M:%S", gmtime (&time));
  
! 	  printf ("%3d: %-20s %s %#10lx %-7ld", cnt,
  		  dynamic_strings + liblist.l_name, timebuf,
  		  liblist.l_checksum, liblist.l_version);
  
--- 5977,5983 ----
  
  	  strftime (timebuf, 20, "%Y-%m-%dT%H:%M:%S", gmtime (&time));
  
! 	  printf ("%3d: %-20s %s %#10lx %-7ld", (int) cnt,
  		  dynamic_strings + liblist.l_name, timebuf,
  		  liblist.l_checksum, liblist.l_version);
  
***************
*** 6258,6264 ****
  	  Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
  
  	  printf ("%5u: %8lu  %#10lx  %s\n",
! 		  cnt, iconf[cnt], (unsigned long) psym->st_value,
  		  dynamic_strings + psym->st_name);
  	}
  
--- 6258,6264 ----
  	  Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
  
  	  printf ("%5u: %8lu  %#10lx  %s\n",
! 		  (unsigned int) cnt, iconf[cnt], (unsigned long) psym->st_value,
  		  dynamic_strings + psym->st_name);
  	}
  
===================================================================
RCS file: RCS/corefile.c,v
retrieving revision 1.1
diff -c -r1.1 corefile.c
No differences encountered
===================================================================
RCS file: RCS/i386.c,v
retrieving revision 1.1
diff -c -r1.1 i386.c
*** /tmp/T0a0064F	Thu Sep  9 10:14:32 1999
--- i386.c	Thu Sep  9 10:12:03 1999
***************
*** 67,73 ****
        if (i386_iscall (instructp))
  	{
  	  DBG (CALLDEBUG,
! 	       printf ("[findcall]\t0x%x:call",
  		       instructp - (unsigned char *) delta));
  	  /*
  	   *  regular pc relative addressing
--- 67,73 ----
        if (i386_iscall (instructp))
  	{
  	  DBG (CALLDEBUG,
! 	       printf ("[findcall]\t0x%lx:call",
  		       instructp - (unsigned char *) delta));
  	  /*
  	   *  regular pc relative addressing
===================================================================
RCS file: RCS/tahoe.c,v
retrieving revision 1.1
diff -c -r1.1 tahoe.c
*** /tmp/T0a0064F	Thu Sep  9 10:14:32 1999
--- tahoe.c	Thu Sep  9 10:03:54 1999
***************
*** 260,266 ****
  	   *    maybe a callf, better check it out.
  	   *      skip the count of the number of arguments.
  	   */
! 	  DBG (CALLDEBUG, printf ("[findcall]\t0x%x:callf",
  				  instructp - (unsigned char *) core_text_space));
  	  firstmode = tahoe_operandmode (instructp + length);
  	  switch (firstmode)
--- 260,266 ----
  	   *    maybe a callf, better check it out.
  	   *      skip the count of the number of arguments.
  	   */
! 	  DBG (CALLDEBUG, printf ("[findcall]\t0x%lx:callf",
  				  instructp - (unsigned char *) core_text_space));
  	  firstmode = tahoe_operandmode (instructp + length);
  	  switch (firstmode)
===================================================================
RCS file: RCS/vax.c,v
retrieving revision 1.1
diff -c -r1.1 vax.c
*** /tmp/T0a0064F	Thu Sep  9 10:14:33 1999
--- vax.c	Thu Sep  9 10:03:21 1999
***************
*** 264,270 ****
  	   *      skip the count of the number of arguments.
  	   */
  	  DBG (CALLDEBUG,
! 	       printf ("[findcall]\t0x%x:calls",
  		       instructp - (unsigned char *) core_text_space));
  	  firstmode = vax_operandmode ((struct modebyte *) (instructp + length));
  	  switch (firstmode)
--- 264,270 ----
  	   *      skip the count of the number of arguments.
  	   */
  	  DBG (CALLDEBUG,
! 	       printf ("[findcall]\t0x%lx:calls",
  		       instructp - (unsigned char *) core_text_space));
  	  firstmode = vax_operandmode ((struct modebyte *) (instructp + length));
  	  switch (firstmode)
===================================================================
RCS file: RCS/dwarf2dbg.c,v
retrieving revision 1.1
diff -c -r1.1 dwarf2dbg.c
*** /tmp/T0a0064O	Thu Sep  9 10:14:41 1999
--- dwarf2dbg.c	Thu Sep  9 09:59:41 1999
***************
*** 618,624 ****
      {
        j = SPECIAL_LINE (i);
        if (j == DWARF2_LINE_BASE)
! 	fprintf (stderr, "\n%4u: ",
  		 DWARF2_LINE_MIN_INSN_LENGTH*SPECIAL_ADDR (i));
        fprintf (stderr, " %2u", ls.opcode_hist[i]);
      }
--- 618,624 ----
      {
        j = SPECIAL_LINE (i);
        if (j == DWARF2_LINE_BASE)
! 	fprintf (stderr, "\n%4lu: ",
  		 DWARF2_LINE_MIN_INSN_LENGTH*SPECIAL_ADDR (i));
        fprintf (stderr, " %2u", ls.opcode_hist[i]);
      }
 

                 reply	other threads:[~1999-09-09  8:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=199909091519.KAA24865@polya.math.purdue.edu \
    --to=lucier@math.purdue.edu \
    --cc=binutils@sourceware.cygnus.com \
    --cc=hosking@cs.purdue.edu \
    --cc=staff@math.purdue.edu \
    --cc=wilker@math.purdue.edu \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).