Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java @ 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 | a9fed06c01d2 |
children |
comparison
equal
deleted
inserted
replaced
8719:c8b31b461e1a | 8750:39432a1cefdd |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
41 return "bsd"; | 41 return "bsd"; |
42 } else if (os.equals("NetBSD")) { | 42 } else if (os.equals("NetBSD")) { |
43 return "bsd"; | 43 return "bsd"; |
44 } else if (os.equals("OpenBSD")) { | 44 } else if (os.equals("OpenBSD")) { |
45 return "bsd"; | 45 return "bsd"; |
46 } else if (os.equals("Darwin") || os.contains("OS X")) { | 46 } else if (os.contains("Darwin") || os.contains("OS X")) { |
47 return "bsd"; | 47 return "darwin"; |
48 } else if (os.startsWith("Windows")) { | 48 } else if (os.startsWith("Windows")) { |
49 return "win32"; | 49 return "win32"; |
50 } else { | 50 } else { |
51 throw new UnsupportedPlatformException("Operating system " + os + " not yet supported"); | 51 throw new UnsupportedPlatformException("Operating system " + os + " not yet supported"); |
52 } | 52 } |