This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
PATCH: Remove addr2name.awk
- From: mitchell at codesourcery dot com (Mark Mitchell)
- To: java-patches at gcc dot gnu dot org
- Date: Mon, 9 Feb 2009 14:44:15 -0800 (PST)
- Subject: PATCH: Remove addr2name.awk
- Reply-to: mark at codesourcery dot com
As discussed in the PR, addr2name.awk is no longer used by libjava.
(It was used by name-finder.cc, but when that was deleted,
addr2name.awk lived on.) Andrew Haley has approved the removal in
principle; here is the actual patch.
OK to apply?
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
2009-02-09 Mark Mitchell <mark@codesourcery.com>
PR other/5303
* addr2name.awk: Remove.
* Makefile.am (bin_SCRIPTS): Remove addr2name.awk.
* Makefile.in: Regenerated.
Index: libjava/addr2name.awk
===================================================================
--- libjava/addr2name.awk (revision 144027)
+++ libjava/addr2name.awk (working copy)
@@ -1,46 +0,0 @@
-#!/bin/awk -f
-
-# Copyright (C) 2000 Free Software Foundation
-
-# This file is part of libgcj.
-
-# This software is copyrighted work licensed under the terms of the
-# Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-# details.
-
-# This script emulates a little of the functionality of addr2line for
-# those systems that don't have it. The only command line argument is
-# an executable name. The script reads hexadecimal addresses from
-# stdin and prints the corresponding symbol names to stdout. The
-# addresses must begin with "0x" and be fully zero filled or this
-# won't work.
-
-BEGIN {
- object = ARGV[1];
- ARGV[1] = "";
-
- while ("nm " object "| sort" | getline) {
- if ($2 == "t" || $2 == "T") {
- address[i] = "0x" $1; name[i] = $3;
- i++;
- }
- }
- syms = i;
-}
-
-{
- lo = 0;
- hi = syms - 1;
-
- while ((hi-1) > lo)
- {
- try = int ((hi + lo) / 2);
- if ($0 < address[try])
- hi = try;
- else if ($0 >= address[try])
- lo = try;
- }
- print name[lo] "\n"; fflush();
-}
-
-
Index: libjava/Makefile.am
===================================================================
--- libjava/Makefile.am (revision 144027)
+++ libjava/Makefile.am (working copy)
@@ -98,7 +98,7 @@ endif
dbexec_DATA = $(db_name)
endif
-bin_SCRIPTS = addr2name.awk contrib/rebuild-gcj-db contrib/aot-compile
+bin_SCRIPTS = contrib/rebuild-gcj-db contrib/aot-compile
if INSTALL_AOT_RPM
bin_SCRIPTS += contrib/aot-compile-rpm