Fix misuse of terminology and improve comment.
authordbaron@dbaron.org
Thu, 22 Mar 2007 23:49:37 -0700
changeset 28 88b6ca48be71766cd9f938b832a615eac3ab4af4
parent 27 4ecc9ca8bf3d08d8b1fccfc8efbe6d51f44be4b4
child 29 431a911ea53a1db18dbeda78e0c37756883d33b0
push idunknown
push userunknown
push dateunknown
milestone1.9a3pre
Fix misuse of terminology and improve comment.
tools/rb/fix-linux-stack.pl
--- a/tools/rb/fix-linux-stack.pl
+++ b/tools/rb/fix-linux-stack.pl
@@ -92,22 +92,24 @@ sub address_adjustment($) {
         }
 
         $address_adjustments{$file} = $adjustment;
     }
     return $address_adjustments{$file};
 }
 
 # Files sometimes contain a link to a separate object file that contains
-# the debug sections of the binary.
+# the debug sections of the binary, removed so that a smaller file can
+# be shipped, but kept separately so that it can be obtained by those
+# who want it.
 # See http://sources.redhat.com/gdb/current/onlinedocs/gdb_16.html#SEC154
-# for documentation of external debuginfo.
+# for documentation of debugging information in separate files.
 # On Fedora distributions, these files can be obtained by installing
 # *-debuginfo RPM packages.
-sub debuginfo_file_for($) {
+sub separate_debug_file_for($) {
     my ($file) = @_;
     # We can read the .gnu_debuglink section using either of:
     #   objdump -s --section=.gnu_debuglink $file
     #   readelf -x .gnu_debuglink $file
     # Since we already depend on readelf in |address_adjustment|, use it
     # again here.
 
     # See if there's a .gnu_debuglink section
@@ -221,17 +223,17 @@ sub debuginfo_file_for($) {
 # Return a reference to a hash whose {read} and {write} entries are a
 # bidirectional pipe to an addr2line process that gives symbol
 # information for a file.
 my %pipes;
 sub addr2line_pipe($) {
     my ($file) = @_;
     my $pipe;
     unless (exists $pipes{$file}) {
-        my $debug_file = debuginfo_file_for($file);
+        my $debug_file = separate_debug_file_for($file);
         $debug_file = $file if ($debug_file eq '');
 
         my $pid = open2($pipe->{read}, $pipe->{write},
                         '/usr/bin/addr2line', '-C', '-f', '-e', $debug_file);
         $pipes{$file} = $pipe;
     } else {
         $pipe = $pipes{$file};
     }