backout patch for bug 378463 due to bustage

This commit is contained in:
sayrer@gmail.com 2007-05-01 17:03:35 -07:00
Родитель aef474d2ac
Коммит a11d15c226
9 изменённых файлов: 44 добавлений и 230 удалений

Просмотреть файл

@ -134,39 +134,16 @@ ifdef MOZ_PROFILE
/bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \; /bin/find $(DIST) -name "*.dbg" -exec mv {} $(DIST)/$(BUILDID) \;
endif # MOZ_PROFILE endif # MOZ_PROFILE
endif # MOZILLA_OFFICIAL endif # MOZILLA_OFFICIAL
endif # WINNT
ifeq ($(OS_ARCH),WINNT)
SYM_FIND_CMD := /bin/find . -path dist -prune -o -name "*.exe" \
-o -name "*.dll" -o -name "*.EXE" | sed "s/\.[^\.]*$$/\.pdb/"
# we want to copy PDB files on Windows
MAKE_SYM_STORE_ARGS := -c
DUMP_SYMS_BIN := $(topsrcdir)/toolkit/airbag/tools/win32/dump_syms.exe
endif
ifeq ($(OS_ARCH),Darwin)
# need to pass arch flags for universal builds
ifdef UNIVERSAL_BINARY
MAKE_SYM_STORE_ARGS := -a "ppc i386"
SYM_DIST := $(DIST)/universal
else
MAKE_SYM_STORE_ARGS := -a $(OS_TEST)
SYM_DIST := $(DIST)
endif
# |file| is stupid on universal binaries, it produces one line of output
# for the file, and one line of output for each architecture contained within.
SYM_FIND_CMD := find -L $(SYM_DIST) -type f -a -perm -100 -o -name "*.dylib" \
| xargs file -L | grep "Mach-O" | grep -v "for architecture" | cut -f1 -d':'
DUMP_SYMS_BIN := $(DIST)/host/bin/dump_syms
endif
buildsymbols: buildsymbols:
ifdef MOZ_DEBUG_SYMBOLS ifdef MOZ_DEBUG_SYMBOLS
ifdef MOZ_AIRBAG ifdef MOZ_AIRBAG
echo building symbol store echo building symbol store
mkdir -p $(DIST)/crashreporter-symbols/$(BUILDID) mkdir -p $(DIST)/crashreporter-symbols/$(BUILDID)
$(SYM_FIND_CMD) | \ /bin/find . -path "./dist" -prune -o -name "*.exe" \
xargs $(topsrcdir)/toolkit/airbag/tools/make_symbol_store.pl \ -o -name "*.dll" -o -name "*.EXE" | sed "s/\.[^\.]*$$/\.pdb/" | \
$(MAKE_SYM_STORE_ARGS) $(DUMP_SYMS_BIN) \ xargs $(topsrcdir)/toolkit/airbag/tools/make_symbol_store.pl -c \
$(topsrcdir)/toolkit/airbag/tools/win32/dump_syms.exe \
$(DIST)/crashreporter-symbols/$(BUILDID) > \ $(DIST)/crashreporter-symbols/$(BUILDID) > \
$(DIST)/crashreporter-symbols/$(BUILDID)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)-symbols.txt $(DIST)/crashreporter-symbols/$(BUILDID)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)-symbols.txt
echo packing symbols echo packing symbols
@ -185,7 +162,6 @@ ifdef MOZ_AIRBAG
endif endif
endif endif
ifeq ($(OS_ARCH),WINNT)
signnss: signnss:
ifdef MOZILLA_OFFICIAL ifdef MOZILLA_OFFICIAL
echo signing NSS libs echo signing NSS libs
@ -193,8 +169,8 @@ ifdef MOZILLA_OFFICIAL
cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
endif # MOZILLA_OFFICIAL endif # MOZILLA_OFFICIAL
BUILDID = $(shell cat $(DEPTH)/config/build_number)
deliver: splitsymbols rebase signnss deliver: splitsymbols rebase signnss
endif # WINNT endif # WINNT
BUILDID = $(shell cat $(DEPTH)/config/build_number)

Просмотреть файл

@ -86,9 +86,9 @@ postflight_all:
# a universal binary too early, before the unified bits have been staged. # a universal binary too early, before the unified bits have been staged.
# Set SIGN_NSS= to skip shlibsign. # Set SIGN_NSS= to skip shlibsign.
$(MAKE) -C $(OBJDIR_PPC)/$(INSTALLER_DIR) \ $(MAKE) -C $(OBJDIR_PPC)/$(INSTALLER_DIR) \
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package UNIVERSAL_BINARY= SIGN_NSS= stage-package
$(MAKE) -C $(OBJDIR_X86)/$(INSTALLER_DIR) \ $(MAKE) -C $(OBJDIR_X86)/$(INSTALLER_DIR) \
UNIVERSAL_BINARY= SIGN_NSS= PKG_SKIP_STRIP=1 stage-package UNIVERSAL_BINARY= SIGN_NSS= stage-package
# Remove .chk files that may have been copied from the NSS build. These will # Remove .chk files that may have been copied from the NSS build. These will
# cause unify to warn or fail if present. New .chk files that are # cause unify to warn or fail if present. New .chk files that are
# appropriate for the merged libraries will be generated when the universal # appropriate for the merged libraries will be generated when the universal

Просмотреть файл

@ -61,11 +61,8 @@ ifeq ($(OS_ARCH),WINNT)
endif endif
ifeq ($(OS_ARCH),Darwin) ifeq ($(OS_ARCH),Darwin)
DIRS += \ DIRS += airbag/src/common/mac \
airbag/src/common/ \
airbag/src/common/mac \
airbag/src/client/mac/handler \ airbag/src/client/mac/handler \
airbag/src/tools/mac/dump_syms \
$(NULL) $(NULL)
endif endif

Просмотреть файл

@ -1,65 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Breakpad integration
#
# The Initial Developer of the Original Code is
# Ted Mielczarek <ted.mielczarek@gmail.com>
# Portions created by the Initial Developer are Copyright (C) 2007
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = breakpad_common
LIBRARY_NAME = breakpad_common_s
HOST_LIBRARY_NAME = host_breakpad_common_s
LOCAL_INCLUDES = -I$(srcdir)/..
CPPSRCS = \
string_conversion.cc \
$(NULL)
CSRCS = \
convert_UTF.c \
$(NULL)
HOST_CPPSRCS = $(CPPSRCS)
HOST_CSRCS = $(CSRCS)
# need static lib
FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -43,29 +43,24 @@ include $(DEPTH)/config/autoconf.mk
MODULE = breakpad_mac_common MODULE = breakpad_mac_common
LIBRARY_NAME = breakpad_mac_common_s LIBRARY_NAME = breakpad_mac_common_s
HOST_LIBRARY_NAME = host_breakpad_mac_common_s
LOCAL_INCLUDES = -I$(srcdir)/../.. LOCAL_INCLUDES = -I$(srcdir)/../..
# This is a little weird, but we're building a host and a target lib here.
# The host lib is used for dump_syms, and the target lib for the
# crash reporter client. Therefore, we don't need all the srcs in both.
CPPSRCS = \ CPPSRCS = \
file_id.cc \ file_id.cc \
macho_id.cc \ macho_id.cc \
macho_walker.cc \ macho_walker.cc \
string_utilities.cc \ string_utilities.cc \
../string_conversion.cc \
$(NULL) $(NULL)
CMSRCS = \ CMSRCS = \
HTTPMultipartUpload.m \ HTTPMultipartUpload.m \
$(NULL) $(NULL)
HOST_CPPSRCS = $(CPPSRCS) CSRCS = \
../convert_UTF.c
HOST_CMMSRCS = \
dump_syms.mm \
$(NULL)
# need static lib # need static lib
FORCE_STATIC_LIB = 1 FORCE_STATIC_LIB = 1

Просмотреть файл

@ -1,68 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Breakpad integration
#
# The Initial Developer of the Original Code is
# Ted Mielczarek <ted.mielczarek@gmail.com>
# Portions created by the Initial Developer are Copyright (C) 2007
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
HOST_PROGRAM = dump_syms
LOCAL_INCLUDES = \
-I$(srcdir)/../../.. \
-I$(srcdir)/../../../common/mac \
$(NULL)
HOST_CMSRCS = \
dump_syms_tool.m \
$(NULL)
HOST_LIBS += \
$(DEPTH)/toolkit/airbag/airbag/src/common/mac/$(LIB_PREFIX)host_breakpad_mac_common_s.$(LIB_SUFFIX) \
$(DEPTH)/toolkit/airbag/airbag/src/common/$(LIB_PREFIX)host_breakpad_common_s.$(LIB_SUFFIX) \
$(NULL)
HOST_LDFLAGS += \
-framework Foundation \
-lcrypto \
$(NULL)
# force C++ linking
CPP_PROG_LINK = 1
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -35,33 +35,27 @@
# #
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
# Usage: make_symbol_store.pl <params> <dump_syms path> <symbol store path> # Usage: make_symbol_store.pl <params> <dump_syms path> <symbol store path> <pdb files>
# <debug info files> # Runs dump_syms on each pdb file specified on the command line,
# Runs dump_syms on each debug info file specified on the command line,
# then places the resulting symbol file in the proper directory # then places the resulting symbol file in the proper directory
# structure in the symbol store path. Accepts multiple files # structure in the symbol store path. Accepts multiple pdb files
# on the command line, so can be called as part of a pipe using # on the command line, so can be called as part of a pipe using
# find <dir> | xargs make_symbol_store.pl <dump_syms> <storepath> # find <dir> -name "*.pdb" | xargs make_symbol_store.pl <dump_syms> <storepath>
# Parameters accepted: # Parameters accepted:
# -c : Copy debug info files to the same directory structure # -c : Copy pdb files to the same directory structure as sym files
# as sym files
# -a "<archs>" : Run dump_syms -a <arch> for each space separated
# cpu architecture in <archs> (only on OS X)
use FileHandle; use FileHandle;
use File::Path; use File::Path;
use File::Copy; use File::Copy;
use File::Basename; use File::Basename;
print "Usage: make_symbol_store.pl <params>" . print "Usage: make_symbol_store.pl <dump_syms path> <storepath> <pdb files>>\n" and exit if scalar @ARGV < 3;
"<dump_syms path> <storepath> <debug info files>\n"
and exit if scalar @ARGV < 3;
# Given a symbol file generated by dump_syms, # Given a symbol file generated by dump_syms,
# and a directory to store the resulting symbol path, # and a directory to store the resulting symbol path,
# move the symbol file into the directory structure # move the symbol file into the directory structure
# expected by the breakpad processor. For details, see: # expected by the airbag processor:
# http://google-breakpad.googlecode.com/svn/trunk/src/processor/simple_symbol_supplier.h # file.pdb/GUID+age/file.sym
sub rename_symbol_file sub rename_symbol_file
{ {
my ($symbol_file, $dest_path) = @_; my ($symbol_file, $dest_path) = @_;
@ -69,15 +63,13 @@ sub rename_symbol_file
return "" unless $fh; return "" unless $fh;
my $line = <$fh>; my $line = <$fh>;
return "" unless $line;
$line =~ s/\s*$//; $line =~ s/\s*$//;
$fh->close(); $fh->close();
return "" unless $line =~ m/^MODULE/; return "" unless $line =~ m/^MODULE/;
# the first line of a sym file looks like: my ($guid,$age,$dbgfile) = (split(/ +/, $line))[1..3];
# MODULE os cpu identifier debug_file $guid =~ s/\-//g;
my ($guid,$dbgfile) = (split(/ +/, $line))[3..4]; my $newpath = $dest_path . "/" . $dbgfile . "/" . uc($guid . $age);
my $newpath = $dest_path . "/" . $dbgfile . "/" . $guid;
eval { mkpath($newpath) }; eval { mkpath($newpath) };
return "" if $@; return "" if $@;
@ -93,36 +85,24 @@ sub rename_symbol_file
return ""; return "";
} }
my $copy_dbg = 0; my $copy_pdbs = 0;
my @archs = (''); if($ARGV[0] eq '-c') {
while (@ARGV && $ARGV[0] =~ m/^-/) { $copy_pdbs = 1;
my $arg = shift; shift;
if ($arg eq '-c') {
$copy_dbg = 1;
}
elsif ($arg eq '-a') {
@archs = (split(/\s+/, shift));
}
} }
my $dump_syms = shift; my $dump_syms = shift;
my $symbol_path = shift; my $symbol_path = shift;
foreach my $dbgfile (@ARGV) { foreach my $pdbfile (@ARGV) {
next unless -f $dbgfile; next unless -f $pdbfile;
# get filename without path or .pdb extension, if it exists my ($sf) = fileparse($pdbfile, ".pdb");
my ($sf) = fileparse($dbgfile, ".pdb");
my $symfile = $symbol_path . "/" . $sf . ".sym"; my $symfile = $symbol_path . "/" . $sf . ".sym";
foreach my $arch (@archs) { system("$dump_syms $pdbfile > $symfile");
my $a = '';
$a = "-a $arch" if $arch ne '';
system("${dump_syms} ${a} ${dbgfile} > ${symfile}");
my $newpath = rename_symbol_file $symfile, $symbol_path; my $newpath = rename_symbol_file $symfile, $symbol_path;
if ($copy_dbg && $newpath ne "") { if($copy_pdbs && $newpath ne "") {
my $out = $newpath; my $out = $newpath;
$out =~ s/^$symbol_path//; $out =~ s/^$symbol_path//;
$out =~ s|^/||; $out =~ s|^/||;
print "$out/${sf}.pdb\n"; print "$out/${sf}.pdb\n";
copy($dbgfile, $newpath); copy($pdbfile, $newpath);
}
} }
} }

Двоичные данные
toolkit/airbag/tools/win32/dump_syms.exe

Двоичный файл не отображается.

Просмотреть файл

@ -200,7 +200,6 @@ endif
ifeq ($(OS_ARCH),Darwin) ifeq ($(OS_ARCH),Darwin)
SHARED_LIBRARY_LIBS += \ SHARED_LIBRARY_LIBS += \
$(DEPTH)/toolkit/airbag/airbag/src/client/mac/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \ $(DEPTH)/toolkit/airbag/airbag/src/client/mac/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
$(DEPTH)/toolkit/airbag/airbag/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
$(DEPTH)/toolkit/airbag/airbag/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX) $(DEPTH)/toolkit/airbag/airbag/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX)
endif endif
endif endif