Mercurial > hg > truffle
comparison make/bsd/makefiles/saproc.make @ 8750:39432a1cefdd
8003348: SA can not read core file on OS
Summary: Macosx uses Mach-O file format for binary files, not ELF format. Currently SA works on core files on other platforms, t his change enables SA work on core file generated on Darwin.
Reviewed-by: sla, sspitsyn
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Thu, 14 Mar 2013 00:33:08 -0700 |
parents | 892acf0431ef |
children | f509b8f4699b |
comparison
equal
deleted
inserted
replaced
8719:c8b31b461e1a | 8750:39432a1cefdd |
---|---|
1 # | 1 # |
2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # Rules to build serviceability agent library, used by vm.make | 25 # Rules to build serviceability agent library, used by vm.make |
26 | 26 |
27 # libsaproc.so: serviceability agent | 27 # libsaproc.so(dylib): serviceability agent |
28 SAPROC = saproc | 28 SAPROC = saproc |
29 | 29 |
30 ifeq ($(OS_VENDOR), Darwin) | 30 ifeq ($(OS_VENDOR), Darwin) |
31 LIBSAPROC = lib$(SAPROC).dylib | 31 LIBSAPROC = lib$(SAPROC).dylib |
32 else | 32 else |
35 | 35 |
36 AGENT_DIR = $(GAMMADIR)/agent | 36 AGENT_DIR = $(GAMMADIR)/agent |
37 | 37 |
38 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) | 38 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) |
39 | 39 |
40 NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c \ | 40 BSD_NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c \ |
41 $(SASRCDIR)/symtab.c \ | 41 $(SASRCDIR)/symtab.c \ |
42 $(SASRCDIR)/libproc_impl.c \ | 42 $(SASRCDIR)/libproc_impl.c \ |
43 $(SASRCDIR)/ps_proc.c \ | 43 $(SASRCDIR)/ps_proc.c \ |
44 $(SASRCDIR)/ps_core.c \ | 44 $(SASRCDIR)/ps_core.c \ |
45 $(SASRCDIR)/BsdDebuggerLocal.c \ | 45 $(SASRCDIR)/BsdDebuggerLocal.c \ |
46 $(AGENT_DIR)/src/share/native/sadis.c | 46 $(AGENT_DIR)/src/share/native/sadis.c |
47 | 47 |
48 DARWIN_NON_STUB_SASRCFILES = $(SASRCDIR)/symtab.c \ | |
49 $(SASRCDIR)/libproc_impl.c \ | |
50 $(SASRCDIR)/ps_core.c \ | |
51 $(SASRCDIR)/MacosxDebuggerLocal.m \ | |
52 $(AGENT_DIR)/src/share/native/sadis.c | |
53 | |
48 ifeq ($(OS_VENDOR), FreeBSD) | 54 ifeq ($(OS_VENDOR), FreeBSD) |
49 SASRCFILES = $(NON_STUB_SASRCFILES) | 55 SASRCFILES = $(BSD_NON_STUB_SASRCFILES) |
50 SALIBS = -lutil -lthread_db | 56 SALIBS = -lutil -lthread_db |
51 SAARCH = $(ARCHFLAG) | 57 SAARCH = $(ARCHFLAG) |
52 else | 58 else |
53 ifeq ($(OS_VENDOR), Darwin) | 59 ifeq ($(OS_VENDOR), Darwin) |
54 SASRCFILES = $(SASRCDIR)/MacosxDebuggerLocal.m | 60 SASRCFILES = $(DARWIN_NON_STUB_SASRCFILES) |
55 SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation | 61 SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation |
56 #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles? | 62 #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles? |
57 SAARCH = $(subst -march=i586,,$(ARCHFLAG)) | 63 SAARCH = $(subst -march=i586,,$(ARCHFLAG)) |
58 else | 64 else |
59 SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c | 65 SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c |
100 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | 106 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ |
101 exit 1; \ | 107 exit 1; \ |
102 fi | 108 fi |
103 @echo Making SA debugger back-end... | 109 @echo Making SA debugger back-end... |
104 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ | 110 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ |
105 $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ | 111 $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ |
106 -I$(SASRCDIR) \ | 112 -I$(SASRCDIR) \ |
107 -I$(GENERATED) \ | 113 -I$(GENERATED) \ |
108 $(BOOT_JAVA_INCLUDES) \ | 114 $(BOOT_JAVA_INCLUDES) \ |
109 $(SASRCFILES) \ | 115 $(SASRCFILES) \ |
110 $(SA_LFLAGS) \ | 116 $(SA_LFLAGS) \ |