mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 11:21:08 -10:00
Compare commits
364
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dea2155250 | ||
|
|
24f744c3f6 | ||
|
|
51a3c93f67 | ||
|
|
c25829a70c | ||
|
|
6fa66df1f4 | ||
|
|
bdce6068d5 | ||
|
|
acdffe0309 | ||
|
|
07015fd910 | ||
|
|
5aa30f3694 | ||
|
|
caf9aa67ea | ||
|
|
4470507328 | ||
|
|
7a0dc52051 | ||
|
|
b347566e9e | ||
|
|
a5dd51794b | ||
|
|
9084021ec5 | ||
|
|
c539bc85a5 | ||
|
|
c36f6ea841 | ||
|
|
3d13ecb2a3 | ||
|
|
ea894217d8 | ||
|
|
a732f407df | ||
|
|
61c90987e6 | ||
|
|
6e687ce127 | ||
|
|
fd1a5f9774 | ||
|
|
7af7dbd8f3 | ||
|
|
81f52c33d6 | ||
|
|
e2f72b6c8c | ||
|
|
c71a7a89df | ||
|
|
42be45dd00 | ||
|
|
83697635fe | ||
|
|
2bdbf5493e | ||
|
|
50fb364c8e | ||
|
|
978ff77890 | ||
|
|
fce5a7458e | ||
|
|
8a242fd70b | ||
|
|
9619892e00 | ||
|
|
0be1ca56fe | ||
|
|
29f7f156a1 | ||
|
|
6d5b971d74 | ||
|
|
d3cb1d9fba | ||
|
|
7e58945567 | ||
|
|
46883f869f | ||
|
|
b820ad666d | ||
|
|
8a14b3abb6 | ||
|
|
9567aae062 | ||
|
|
cbd2c28ecb | ||
|
|
08786789fb | ||
|
|
c88eaaf586 | ||
|
|
c0c8702250 | ||
|
|
b2bdb148f9 | ||
|
|
5ae0087991 | ||
|
|
2c9aa85949 | ||
|
|
0f3b50adc7 | ||
|
|
e90de6c7a6 | ||
|
|
493bd3313c | ||
|
|
8cc61957c8 | ||
|
|
526fe0538c | ||
|
|
b13663f353 | ||
|
|
113ea7ee81 | ||
|
|
b914c41c57 | ||
|
|
43b6145b58 | ||
|
|
50e81ed6e5 | ||
|
|
3ed2bba673 | ||
|
|
e760180737 | ||
|
|
7ea416f081 | ||
|
|
c4a5dbcf3d | ||
|
|
221ffc8788 | ||
|
|
3203a7af84 | ||
|
|
56e9666c58 | ||
|
|
eae2997490 | ||
|
|
3169b44554 | ||
|
|
14f694dd39 | ||
|
|
7f9b992d0f | ||
|
|
e7878d1519 | ||
|
|
f7f9901f59 | ||
|
|
83897d4af1 | ||
|
|
60ecc9e78d | ||
|
|
e889217524 | ||
|
|
248d8d619b | ||
|
|
23c6a4d451 | ||
|
|
8ca772d7f9 | ||
|
|
5e7c20ad81 | ||
|
|
0d11d8fc87 | ||
|
|
f9a448b3f5 | ||
|
|
092b3853a3 | ||
|
|
681f6fdb09 | ||
|
|
b3cdd867e6 | ||
|
|
58bf51edfc | ||
|
|
2ab95d2712 | ||
|
|
15cd426925 | ||
|
|
2a42049110 | ||
|
|
6f089db7b0 | ||
|
|
5cffec7a22 | ||
|
|
da0255c3e0 | ||
|
|
d0fc1a66e2 | ||
|
|
d9e045251d | ||
|
|
ca04bb1fb6 | ||
|
|
cda0cfb695 | ||
|
|
c282bdc62b | ||
|
|
ffa0cc887f | ||
|
|
2c13a959c0 | ||
|
|
6269e4d954 | ||
|
|
fdd6526d3b | ||
|
|
f099ee2406 | ||
|
|
72397bd7f8 | ||
|
|
04c5c37a6f | ||
|
|
e571108acf | ||
|
|
5200955033 | ||
|
|
8ed20455a5 | ||
|
|
934a577a94 | ||
|
|
b919768e1a | ||
|
|
700a14a684 | ||
|
|
4553aa5572 | ||
|
|
57e9c464fa | ||
|
|
28f1e4e0d2 | ||
|
|
25689d5d5a | ||
|
|
5110c09830 | ||
|
|
0cb79a3854 | ||
|
|
7e087da798 | ||
|
|
753c3237d9 | ||
|
|
28bfe7cee2 | ||
|
|
2cac09666c | ||
|
|
f9087fc43a | ||
|
|
4697b3a8ea | ||
|
|
104b14ecf9 | ||
|
|
e10df7ebf6 | ||
|
|
39cddf8a68 | ||
|
|
0982d3a325 | ||
|
|
10a4bf2efa | ||
|
|
6c583a2b7f | ||
|
|
e29bed4063 | ||
|
|
b1a5a05ad1 | ||
|
|
be6f705c08 | ||
|
|
37dea728dd | ||
|
|
775c9b819c | ||
|
|
b48c3afbae | ||
|
|
f4f6441b3d | ||
|
|
7b7fe93bca | ||
|
|
226a68909a | ||
|
|
ddc8aae311 | ||
|
|
79260d2d07 | ||
|
|
3044c4a61d | ||
|
|
1c2ae72289 | ||
|
|
bc6fbd6bcc | ||
|
|
5792758c46 | ||
|
|
696b0f5467 | ||
|
|
6a93bb2af6 | ||
|
|
6d0f3fd4ca | ||
|
|
df2b5d5286 | ||
|
|
5e4c9ee41e | ||
|
|
f1417d0c92 | ||
|
|
7adea6681b | ||
|
|
a3d81eb0f1 | ||
|
|
78f3e813ed | ||
|
|
fabb10ad11 | ||
|
|
94c5c521e6 | ||
|
|
900d99ee7b | ||
|
|
5ad28260db | ||
|
|
affcfa72d7 | ||
|
|
8f4becb13d | ||
|
|
cb66512665 | ||
|
|
99642da77c | ||
|
|
88ef4cd570 | ||
|
|
70ddfd4bcc | ||
|
|
1229e7daf1 | ||
|
|
8b237bc4b7 | ||
|
|
bd3d8b8c6f | ||
|
|
c12a9b1d93 | ||
|
|
472a9f26ed | ||
|
|
eabe712b8b | ||
|
|
08daf31bbe | ||
|
|
3ded86ad40 | ||
|
|
2a38031d9a | ||
|
|
af7e67f956 | ||
|
|
6abedb9098 | ||
|
|
27af6d7a9f | ||
|
|
2123795fb8 | ||
|
|
61a52200c1 | ||
|
|
06906ae1b4 | ||
|
|
7ee4cabfd4 | ||
|
|
93a97ee240 | ||
|
|
8f24658bda | ||
|
|
20452351dc | ||
|
|
80331bb7da | ||
|
|
cc7f45676f | ||
|
|
a3984aa406 | ||
|
|
32ddacbc61 | ||
|
|
f76f0c9ea1 | ||
|
|
99f4d913c6 | ||
|
|
1ac151d24b | ||
|
|
1889e9581a | ||
|
|
7c372ff816 | ||
|
|
2dc98e990f | ||
|
|
eb62294a70 | ||
|
|
da95f710cd | ||
|
|
6d0c2144a9 | ||
|
|
e9d06820c7 | ||
|
|
f8b819f184 | ||
|
|
d0b2dacbe4 | ||
|
|
361cbb0e82 | ||
|
|
aa705e5619 | ||
|
|
fa603f3bee | ||
|
|
95dd6ea1a4 | ||
|
|
24d6fe6b76 | ||
|
|
13e9655f41 | ||
|
|
20cab4607b | ||
|
|
a066fc66dc | ||
|
|
8be53f2294 | ||
|
|
0fba6804b3 | ||
|
|
c9a2f7eb14 | ||
|
|
f62d078e95 | ||
|
|
54252be418 | ||
|
|
4fc78ba4ea | ||
|
|
e1eee09270 | ||
|
|
8ba00d695d | ||
|
|
0c783ab8b1 | ||
|
|
97361f5f9c | ||
|
|
24caf69a58 | ||
|
|
bcfd0bdb59 | ||
|
|
7d1411194d | ||
|
|
e32eb2915e | ||
|
|
d408ecc25c | ||
|
|
edc150aab7 | ||
|
|
c36db18826 | ||
|
|
3ff4bc57ea | ||
|
|
c9843e2c89 | ||
|
|
10cd9adccd | ||
|
|
d7834ea50f | ||
|
|
55e2293039 | ||
|
|
1ebc5c39a4 | ||
|
|
6f310cda67 | ||
|
|
fe4e400292 | ||
|
|
5a919fe1e7 | ||
|
|
6680200ef3 | ||
|
|
1b475c438a | ||
|
|
996785933b | ||
|
|
2dbd0a3ad8 | ||
|
|
479353e65f | ||
|
|
3e7a5e370b | ||
|
|
2528cd4333 | ||
|
|
9b36ff0bbf | ||
|
|
3d266d3e19 | ||
|
|
b51d4bf5c0 | ||
|
|
e3e7d6fd04 | ||
|
|
62fc0d1475 | ||
|
|
d6d9b1ae83 | ||
|
|
ab8a3912c0 | ||
|
|
7b7d32bedc | ||
|
|
c887be36d2 | ||
|
|
cdad88da7b | ||
|
|
0935e38357 | ||
|
|
0d5c493022 | ||
|
|
3a4ccc0796 | ||
|
|
fed6c32e36 | ||
|
|
2b87f361c2 | ||
|
|
c1dd76aec2 | ||
|
|
ab1ca6f689 | ||
|
|
4de3932df4 | ||
|
|
00bb13f6a5 | ||
|
|
c38a877b2e | ||
|
|
c55c4a72d8 | ||
|
|
55c27b7f53 | ||
|
|
486b49025b | ||
|
|
845c8aed57 | ||
|
|
7fffb9c388 | ||
|
|
30fb9e2618 | ||
|
|
3581d0d32a | ||
|
|
b4f3a19ad8 | ||
|
|
ff4967bdf5 | ||
|
|
16db9f5d02 | ||
|
|
c620a32251 | ||
|
|
c2b27112b4 | ||
|
|
5d4a9b0207 | ||
|
|
b0d8d4ef4e | ||
|
|
3b834d2a46 | ||
|
|
098b1bdddb | ||
|
|
8ce2b6b548 | ||
|
|
00698f7408 | ||
|
|
9a9caf7494 | ||
|
|
143c6c2209 | ||
|
|
c6f235cd88 | ||
|
|
c8e62dada8 | ||
|
|
6d20855af2 | ||
|
|
c3af5bc992 | ||
|
|
2ada13b646 | ||
|
|
44c5a48b97 | ||
|
|
8ec4b50c19 | ||
|
|
7450e5985f | ||
|
|
49fbaad9d3 | ||
|
|
567eead66e | ||
|
|
ed6134ef61 | ||
|
|
a314396709 | ||
|
|
3b4b25dadc | ||
|
|
765d709d24 | ||
|
|
42c253731a | ||
|
|
a5d2e11456 | ||
|
|
8a2fd1e276 | ||
|
|
c044190b79 | ||
|
|
65c1997913 | ||
|
|
856aa24078 | ||
|
|
bd693bbc41 | ||
|
|
9c4da07fc1 | ||
|
|
d27243324f | ||
|
|
6f824e0b6f | ||
|
|
e3da710362 | ||
|
|
cc612cb4d0 | ||
|
|
dd63bc4cda | ||
|
|
c8c225f066 | ||
|
|
6e3d2eb291 | ||
|
|
a12ee3f98d | ||
|
|
feba93a5de | ||
|
|
9958261a8a | ||
|
|
8db00dcc40 | ||
|
|
b7c654d26d | ||
|
|
3002249dab | ||
|
|
840801ecb9 | ||
|
|
4a655c66f7 | ||
|
|
f4a3cbdaed | ||
|
|
e8b9107c3f | ||
|
|
edec9a54af | ||
|
|
5ac529a182 | ||
|
|
d6c6e7b6de | ||
|
|
48cc848a43 | ||
|
|
d8e3d0e959 | ||
|
|
6b97b22c3b | ||
|
|
a33fb26f89 | ||
|
|
6767d24b3f | ||
|
|
1301b2697c | ||
|
|
0453803999 | ||
|
|
c59dc39170 | ||
|
|
0c9216e5a4 | ||
|
|
4ef57bc080 | ||
|
|
b728d181e0 | ||
|
|
06ec2cc12e | ||
|
|
e0789c921c | ||
|
|
a35eef3a6a | ||
|
|
726c4a3f18 | ||
|
|
c0025d2188 | ||
|
|
745f4356c2 | ||
|
|
f5c88fb0fc | ||
|
|
e7e3420219 | ||
|
|
b1ee8a55ff | ||
|
|
13038ab9eb | ||
|
|
7192da2671 | ||
|
|
a8c94d1d17 | ||
|
|
cd7496d658 | ||
|
|
0d21061d41 | ||
|
|
150fa242fb | ||
|
|
fe1a1784f4 | ||
|
|
ae9f1d7f7a | ||
|
|
c88dea2f39 | ||
|
|
e06fe98fa0 | ||
|
|
3ebd1cfd57 | ||
|
|
c937b46879 | ||
|
|
b05d49ffaa | ||
|
|
1b8ba5d892 | ||
|
|
e07d3c2fe3 | ||
|
|
87033ea0ac | ||
|
|
9df06f7f5d | ||
|
|
f3106df8ba | ||
|
|
2c9e57560e | ||
|
|
9ecc046d41 | ||
|
|
0c9641f7dc | ||
|
|
e35814198d | ||
|
|
48e3e32add |
No files matched your search
+6
-8
@@ -1,19 +1,17 @@
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
config.rpath crlf=input
|
||||
configure.host crlf=input
|
||||
mkinstalldirs crlf=input
|
||||
*.sh crlf=input
|
||||
*.sources crlf=input
|
||||
.gitattributes crlf=input
|
||||
*akefile* crlf=input
|
||||
configure.ac crlf=input
|
||||
|
||||
# ensure native line endings on checkout
|
||||
*.c crlf
|
||||
*.h crlf
|
||||
*.cs crlf
|
||||
*.sh crlf
|
||||
*.il crlf
|
||||
|
||||
.gitattributes crlf
|
||||
*akefile* crlf
|
||||
*.sources crlf
|
||||
|
||||
# don't do anything to line-endings. Let CRLFs go into the repo, and CRLF on checkout
|
||||
*.bat -crlf
|
||||
*.sln -crlf
|
||||
|
||||
@@ -38,8 +38,6 @@ obj/
|
||||
[Rr]elease*/
|
||||
Ankh.NoLoad
|
||||
*.gpState
|
||||
.vscode/
|
||||
*.exp
|
||||
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
|
||||
+9
-32
@@ -7,6 +7,9 @@
|
||||
[submodule "external/cecil"]
|
||||
path = external/cecil
|
||||
url = git://github.com/mono/cecil.git
|
||||
[submodule "external/debian-snapshot"]
|
||||
path = external/debian-snapshot
|
||||
url = git://github.com/directhex/mono-snapshot.git
|
||||
[submodule "external/rx"]
|
||||
path = external/rx
|
||||
url = git://github.com/mono/rx.git
|
||||
@@ -20,41 +23,15 @@
|
||||
[submodule "external/reference-assemblies"]
|
||||
path = external/binary-reference-assemblies
|
||||
url = git://github.com/mono/reference-assemblies.git
|
||||
[submodule "external/Lucene.Net.Light"]
|
||||
path = external/Lucene.Net.Light
|
||||
url = git://github.com/mono/Lucene.Net.Light.git
|
||||
[submodule "external/nunit-lite"]
|
||||
path = external/nunit-lite
|
||||
url = git://github.com/mono/NUnitLite.git
|
||||
[submodule "external/nuget-buildtasks"]
|
||||
path = external/nuget-buildtasks
|
||||
url = git://github.com/mono/NuGet.BuildTasks
|
||||
[submodule "external/cecil-legacy"]
|
||||
path = external/cecil-legacy
|
||||
url = git://github.com/mono/cecil.git
|
||||
branch = mono-legacy-0.9.5
|
||||
[submodule "external/boringssl"]
|
||||
path = external/boringssl
|
||||
url = git://github.com/mono/boringssl.git
|
||||
branch = mono
|
||||
[submodule "external/corefx"]
|
||||
path = external/corefx
|
||||
url = git://github.com/mono/corefx.git
|
||||
[submodule "external/bockbuild"]
|
||||
path = external/bockbuild
|
||||
url = git://github.com/mono/bockbuild.git
|
||||
[submodule "external/linker"]
|
||||
path = external/linker
|
||||
url = git://github.com/mono/linker.git
|
||||
[submodule "external/roslyn-binaries"]
|
||||
path = external/roslyn-binaries
|
||||
url = git://github.com/mono/roslyn-binaries.git
|
||||
[submodule "external/corert"]
|
||||
path = external/corert
|
||||
url = git://github.com/mono/corert.git
|
||||
[submodule "external/xunit-binaries"]
|
||||
path = external/xunit-binaries
|
||||
url = git://github.com/mono/xunit-binaries.git
|
||||
[submodule "external/api-doc-tools"]
|
||||
path = external/api-doc-tools
|
||||
url = git://github.com/mono/api-doc-tools.git
|
||||
[submodule "external/api-snapshot"]
|
||||
path = external/api-snapshot
|
||||
url = git://github.com/mono/api-snapshot.git
|
||||
[submodule "external/buildtools"]
|
||||
path = external/buildtools
|
||||
url = git://github.com/mono/buildtools.git
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
# Mono Code Owners File
|
||||
#
|
||||
# GitHub uses this file to determine who to ping for reviews on pull requests.
|
||||
# If you're the primary maintainer of an area of Mono and you don't mind
|
||||
# reviewing pull requests, please add yourself to this file. You may want to
|
||||
# avoid adding entries for commonly changed or automatically generated files
|
||||
# (e.g. stuff in external/, or various generated *.csproj files) so as not to
|
||||
# get spammed with emails.
|
||||
#
|
||||
# Note that if two patterns match a file, the later pattern takes precedence.
|
||||
#
|
||||
# Please keep this file alphabetically sorted.
|
||||
#
|
||||
# Reference:
|
||||
#
|
||||
# https://github.com/blog/2392-introducing-code-owners
|
||||
# https://help.github.com/articles/about-codeowners
|
||||
|
||||
acceptance-tests/* @akoeplinger
|
||||
acceptance-tests/profiler-stress* @alexrp
|
||||
docs/sources/mono-api-profiler.html @alexrp
|
||||
man/mprof-report.1 @alexrp
|
||||
mcs/build @marek-safar
|
||||
mcs/class @marek-safar
|
||||
mcs/errors @marek-safar
|
||||
mcs/mcs @marek-safar
|
||||
mcs/tests @marek-safar
|
||||
mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
|
||||
mcs/class/Mono.Btls.Interface @baulig
|
||||
mcs/class/Mono.Data.Tds @egorbo
|
||||
mcs/class/Mono.Debugger.Soft @vargaz
|
||||
mcs/class/Mono.Options @jonpryor
|
||||
mcs/class/Mono.Profiler.Log @alexrp
|
||||
mcs/class/Mono.Security/Mono.Security/Interface @baulig
|
||||
mcs/class/System/Mono.AppleTls @baulig
|
||||
mcs/class/System/Mono.Btls @baulig
|
||||
mcs/class/System/Mono.Net.Security @baulig
|
||||
mcs/class/System/Mono.Security.Interface @baulig
|
||||
mcs/class/System.Data @egorbo
|
||||
mono/metadata/*profiler* @alexrp
|
||||
mono/metadata/monitor* @brzvlad
|
||||
mono/metadata/sgen* @brzvlad
|
||||
mono/metadata/threads* @luhenry @kumpera
|
||||
mono/metadata/threadpool* @luhenry
|
||||
mono/metadata/w32* @luhenry
|
||||
mono/mini/*profiler* @alexrp
|
||||
mono/profiler @alexrp
|
||||
mono/sgen @brzvlad
|
||||
mono/utils/atomic* @alexrp
|
||||
mono/utils/mono-hwcap* @alexrp
|
||||
mono/utils/mono-mem* @alexrp
|
||||
mono/utils/mono-threads* @luhenry @kumpera
|
||||
msvc/*profiler* @alexrp
|
||||
msvc/scripts @akoeplinger
|
||||
packaging/Windows @akoeplinger
|
||||
samples/profiler @alexrp
|
||||
samples/size @alexrp
|
||||
scripts/ci/run-jenkins.sh @akoeplinger
|
||||
scripts/ci/run-test-acceptance-tests.sh @akoeplinger
|
||||
scripts/ci/run-test-default.sh @akoeplinger
|
||||
scripts/ci/run-test-profiler-stress-tests.sh @alexrp
|
||||
scripts/ci/util.sh @akoeplinger
|
||||
+2
-2
@@ -23,7 +23,7 @@ License
|
||||
|
||||
The Mono runtime, compilers, and tools and most of the class libraries
|
||||
are licensed under the MIT license. But include some bits of code
|
||||
licensed under different licenses. The exact list is [available here](https://github.com/mono/mono/blob/master/LICENSE).
|
||||
licensed under different licenses. The exact list is [available here] (https://github.com/mono/mono/blob/master/LICENSE).
|
||||
|
||||
Different parts of Mono use different licenses. The actual details of
|
||||
which licenses are used for which parts are detailed on the LICENSE
|
||||
@@ -32,7 +32,7 @@ file in this directory.
|
||||
CLA
|
||||
=======
|
||||
|
||||
Contributions are now taken under the [.NET Foundation CLA](https://cla2.dotnetfoundation.org/).
|
||||
Contributions are now taken under the [.NET Foundation CLA] (https://cla2.dotnetfoundation.org/).
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
+26
-21
@@ -4,22 +4,23 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
# Some tools might not build when cross-compiling
|
||||
if CROSS_COMPILING
|
||||
tools_dir =
|
||||
else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
endif
|
||||
|
||||
all: update_submodules
|
||||
|
||||
SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
|
||||
update_submodules:
|
||||
@$(srcdir)/scripts/update_submodules.sh
|
||||
@$(srcdir)/scripts/update_submodules
|
||||
|
||||
.PHONY: update_submodules
|
||||
|
||||
@@ -42,25 +43,30 @@ dist-hook:
|
||||
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
|
||||
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
|
||||
rm -rf `find $(top_distdir)/external -path '*\.git'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.exe'`
|
||||
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*'`
|
||||
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
|
||||
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
|
||||
# Disable this for now because it is very slow and causes wrench to timeout:
|
||||
# test ! -d $(GIT_DIR) || ./scripts/commits-to-changelog.py --root=$(distdir) last-commit-with-compulsory-changelog-entry
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
noinst_DATA = mono-uninstalled.pc
|
||||
DISTCLEANFILES= mono-uninstalled.pc
|
||||
|
||||
# building with monolite
|
||||
mcslib = $(mcs_topdir)/class/lib
|
||||
monolite = $(mcslib)/monolite
|
||||
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
|
||||
monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
|
||||
.PHONY: get-monolite-latest
|
||||
get-monolite-latest:
|
||||
$(MAKE) -C $(mcs_topdir)/class get-monolite-latest
|
||||
|
||||
if BITCODE
|
||||
BITCODE_CHECK=yes
|
||||
endif
|
||||
|
||||
.PHONY: check-ci
|
||||
check-ci:
|
||||
MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
|
||||
-rm -fr $(mcslib)/monolite-*
|
||||
-mkdir -p $(mcslib)
|
||||
test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
|
||||
test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
|
||||
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && mv -f monolite-* monolite
|
||||
|
||||
.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
|
||||
validate: do-build-mono-mcs
|
||||
@@ -147,7 +153,6 @@ package-inputs:
|
||||
read libou; echo " <library_output>$$libou</library_output>"; \
|
||||
read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
|
||||
read profile; echo " <profile>$$profile</profile>"; \
|
||||
read resxt; echo " <resources>$$resxt</resources>"; \
|
||||
read resp; echo " <response>$$resp</response>"; \
|
||||
echo " </project>") >> msvc/scripts/order.xml; \
|
||||
done
|
||||
|
||||
@@ -15,23 +15,19 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
|
||||
6. [Configuration Options](#configuration-options)
|
||||
7. [Working with Submodules](#working-with-submodules)
|
||||
|
||||
### Build Status
|
||||
**Build Status**
|
||||
|
||||
| OS | Architecture | Status |
|
||||
|--------------|--------------------|------------------------------|
|
||||
| Ubuntu 14.04 | amd64 | [![ubuntu-1404-amd64][1]][2] |
|
||||
| Ubuntu 14.04 | i386 | [![ubuntu-1404-i386][3]][4] |
|
||||
| Debian 8 | armel | [![debian-8-armel][5]][6] |
|
||||
| Debian 8 | armhf | [![debian-8-armhf][7]][8] |
|
||||
| Debian 8 | arm64 | [![debian-8-arm64][9]][10] |
|
||||
| OS X | amd64 | [![osx-amd64][11]][12] |
|
||||
| OS X | i386 | [![osx-i386][13]][14] |
|
||||
| Windows | amd64 | [![windows-amd64][15]][16] |
|
||||
| Windows | i386 | [![windows-amd64][17]][18] |
|
||||
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
|
||||
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
|
||||
Officially supported architectures:
|
||||
|
||||
_(cs) = community supported architecture_
|
||||
| ubuntu-1404-amd64 | ubuntu-1404-i386 | debian-8-armel | debian-8-armhf | debian-8-arm64 | windows-amd64 |
|
||||
|------------------------------|-----------------------------|---------------------------|---------------------------|-----------------------------|----------------------------|
|
||||
| [![ubuntu-1404-amd64][1]][2] | [![ubuntu-1404-i386][3]][4] | [![debian-8-armel][5]][6] | [![debian-8-armhf][7]][8] | [![debian-8-arm64][9]][10] | [![windows-amd64][11]][12] |
|
||||
|
||||
Community supported architectures:
|
||||
|
||||
| centos-s390x |
|
||||
|---------------------------|
|
||||
| [![centos-s390x][13]][14] |
|
||||
|
||||
[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
|
||||
[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
|
||||
@@ -43,18 +39,10 @@ _(cs) = community supported architecture_
|
||||
[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
|
||||
[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
|
||||
[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
|
||||
[11]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/badge/icon
|
||||
[12]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/
|
||||
[13]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/badge/icon
|
||||
[14]: https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-i386/
|
||||
[15]: https://jenkins.mono-project.com/job/z/label=w64/badge/icon
|
||||
[16]: https://jenkins.mono-project.com/job/z/label=w64/
|
||||
[17]: https://jenkins.mono-project.com/job/z/label=w32/badge/icon
|
||||
[18]: https://jenkins.mono-project.com/job/z/label=w32/
|
||||
[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
|
||||
[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
|
||||
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
|
||||
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
|
||||
[11]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
|
||||
[12]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
|
||||
[13]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
|
||||
[14]: https://jenkins.mono-project.com/job/z/label=centos-s390x
|
||||
|
||||
Compilation and Installation
|
||||
============================
|
||||
@@ -193,18 +181,22 @@ disable the compilation of a Mono runtime with the SGen garbage
|
||||
collector.
|
||||
|
||||
* On platforms that support it, after building Mono, you will have
|
||||
both a `mono-boehm` binary and a `mono-sgen` binary. `mono-boehm` uses Boehm,
|
||||
both a `mono` binary and a `mono-sgen` binary. `mono` uses Boehm,
|
||||
while `mono-sgen` uses the Simple Generational GC.
|
||||
|
||||
* `--with-libgc=[included, none]` - Selects the default Boehm
|
||||
* `--with-gc=[included, boehm, none]` - Selects the default Boehm
|
||||
garbage collector engine to use.
|
||||
|
||||
* *included*: (*slightly modified Boehm GC*) This is the default
|
||||
value for the Boehm GC, and it's the most feature complete, it will
|
||||
allow Mono to use typed allocations and support the debugger.
|
||||
|
||||
* *boehm*: This is used to use a system-install Boehm GC, it is
|
||||
useful to test new features available in Boehm GC, but we do not
|
||||
recommend that people use this, as it disables a few features.
|
||||
|
||||
* *none*:
|
||||
Disables the inclusion of a Boehm garbage collector.
|
||||
Disables the inclusion of a garbage collector.
|
||||
|
||||
* This defaults to `included`.
|
||||
|
||||
@@ -461,19 +453,6 @@ disable it.
|
||||
* There are a number of runtime options to control this
|
||||
also, see the man page.
|
||||
|
||||
* `--with-csc=roslyn,mcs,default`
|
||||
|
||||
* Use this option to configure which C# compiler to use. By default
|
||||
the configure script will pick Roslyn, except on platforms where
|
||||
Roslyn does not work (Big Endian systems) where it will pick mcs.
|
||||
|
||||
If you specify "mcs", then Mono's C# compiler will be used. This
|
||||
also allows for a complete bootstrap of Mono's core compiler and
|
||||
core libraries from source.
|
||||
|
||||
If you specify "roslyn", then Roslyn's C# compiler will be used.
|
||||
This currently uses Roslyn binaries.
|
||||
|
||||
* `--enable-nacl`
|
||||
|
||||
* This configures the Mono compiler to generate code
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
ACCEPTANCE_TESTS_PATH=external
|
||||
BENCHMARKER_PATH=$(ACCEPTANCE_TESTS_PATH)/benchmarker
|
||||
ROSLYN_PATH=$(ACCEPTANCE_TESTS_PATH)/roslyn
|
||||
CORECLR_PATH=$(ACCEPTANCE_TESTS_PATH)/coreclr
|
||||
MSTESTSUITE_PATH=$(ACCEPTANCE_TESTS_PATH)/ms-test-suite
|
||||
@@ -8,19 +7,17 @@ CLEANFILES = *.dll *.exe *.mdb
|
||||
EXTRA_DIST=README.md SUBMODULES.json versions.mk roslyn.mk coreclr.mk ms-test-suite.mk
|
||||
|
||||
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
|
||||
TOOLS_CLASS=$(mcs_topdir)/class/lib/build
|
||||
|
||||
RUNTIME = MONO_PATH=$(CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
TOOLS_RUNTIME = MONO_PATH=$(TOOLS_CLASS) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
MCS = $(TOOLS_RUNTIME) $(CSC) -nologo -noconfig -lib:$(CLASS) -r:System.dll -r:System.Core.dll -r:System.Xml.dll -r:Microsoft.CSharp.dll
|
||||
ILASM = $(TOOLS_RUNTIME) $(TOOLS_CLASS)/ilasm.exe
|
||||
with_mono_path = MONO_PATH=$(CLASS)
|
||||
RUNTIME = $(with_mono_path) $(abs_top_builddir)/runtime/mono-wrapper --debug
|
||||
MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe
|
||||
ILASM = $(RUNTIME) $(CLASS)/ilasm.exe
|
||||
|
||||
include versions.mk
|
||||
include profiler-stress.mk
|
||||
include roslyn.mk
|
||||
include coreclr.mk
|
||||
include ms-test-suite.mk
|
||||
|
||||
check-full: check-profiler-stress check-roslyn check-coreclr check-ms-test-suite
|
||||
check-full: check-roslyn check-coreclr check-ms-test-suite
|
||||
|
||||
clean-local: clean-local-coreclr
|
||||
@@ -18,17 +18,9 @@
|
||||
{
|
||||
"name": "ms-test-suite",
|
||||
"url": "[email protected]:xamarin/ms-test-suite.git",
|
||||
"rev": "73c155f76b55839f26ba707d6d40091060e4f5d8",
|
||||
"rev": "840653918efed24f00f5e166094f06354cae7255",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "ms-test-suite"
|
||||
},
|
||||
{
|
||||
"name": "benchmarker",
|
||||
"url": "git://github.com/xamarin/benchmarker.git",
|
||||
"rev": "97f618cd585af549dd861b7c142656c496f6a89b",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "benchmarker"
|
||||
}
|
||||
]
|
||||
+87
-113
@@ -262,7 +262,9 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow3.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime1.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/localloc/localloc3.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int16.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int32.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int64.cs \
|
||||
@@ -421,6 +423,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/lcs/lcsmixed.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/lcs/lcsval.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/lcs/lcsvalbox.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/arrres.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/gcarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/selfref.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/AsgOp/i4/i4.cs \
|
||||
@@ -867,6 +870,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b19171/jmp2blk.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b30251/b578931.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b102533/DeadBlock.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b268908/vars2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b320147/1086745236.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b321799/repro.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b338014/vsw338014.cs \
|
||||
@@ -937,6 +941,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102729/b102729.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102763/gcparamonstack.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b102886/ovf.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b10828/redundant.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b19394/stringArray114.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b21015/test.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b26496/_1d6bgof.cs \
|
||||
@@ -1045,6 +1050,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cg/cgstress/CgStress3.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/HugeArray.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/HugeArray1.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/HugeField1.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/HugeField2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/arrayexpr1.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/arrayexpr2.cs \
|
||||
@@ -1273,6 +1279,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/366085/366085.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/simple/finally.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/unittests/returnfromcatch.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/regression/v1/threads/functional/threadpool/cs_threadpoolnullchecks/cs_threadpoolnullchecks.cs \
|
||||
@@ -1371,6 +1378,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/components/stopwatch/co9600ctor.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/components/stopwatch/co9604get_isrunning.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/action/actionctor.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/action/actioninvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/activator/activatorcreateinstance2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionctor1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/argumentexception/argumentexceptionmessage.cs \
|
||||
@@ -1822,6 +1830,8 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/collections/ienumerator/ienumeratorreset.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/collections/ilist/ilistisfixedsize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/collections/ilist/ilistitem.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/comparison/comparisoninvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/console/consoleseterror.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/console/consolesetout.cs \
|
||||
@@ -2053,6 +2063,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimedate.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimegethashcode.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimehour.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimemaxvalue.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimemillisecond.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimeminute.cs \
|
||||
@@ -2203,7 +2214,9 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/environment/environmentprocessorcount_cti.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventargs/eventargsctor.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler/eventhandlerinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerctor.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/exception/exceptionctor1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/exception/exceptionctor2.cs \
|
||||
@@ -2217,6 +2230,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcgettotalmemory.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gckeepalive.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcmaxgeneration.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcsuppressfinalize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcwaitforpendingfinalizers.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/calendarweekrule/calendarweekrulefirstday.cs \
|
||||
@@ -2226,8 +2240,13 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetnumericvalue2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/charunicodeinfo/charunicodeinfogetunicodecategory2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoisprefix.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoissuffix.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfolastindexof.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorecase.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorekanatype.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareoptions/compareoptionsignorenonspace.cs \
|
||||
@@ -2302,6 +2321,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnone.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/numberstyles/numberstylesnumber.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfocurrencysymbol.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfocurrentregion.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoequals.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfogethashcode.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfoismetric.cs \
|
||||
@@ -2537,6 +2557,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/fileshare/fileshareread.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/fileshare/filesharereadwrite.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/fileshare/filesharewrite.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/ioexception/ioexceptionctor2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/memorystream/memorystreamctor.cs \
|
||||
@@ -2687,6 +2708,8 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/platformnotsupportedexception/platformnotsupportedexceptionctor3.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/predicate/predicateinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/random/randomctor1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/random/randomctor2.cs \
|
||||
@@ -3180,6 +3203,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalgetlastwin32error.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalreadint641.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributearraysubtype.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshalasattribute/marshalasattributector2.cs \
|
||||
@@ -3277,6 +3301,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringcompare9.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringcompareordinal1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringcompareordinal2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringcompareto1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringconcat1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringconcat2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringconcat3.cs \
|
||||
@@ -3289,6 +3314,9 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringctor5.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringctorchar.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringempty.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals3.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals6.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringformat1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringformat2.cs \
|
||||
@@ -3642,6 +3670,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferencector2b.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferenceisaliveb.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetrackresurrection_cti.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/buffer/asurt_99893.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/collections/generic/hashset/regression_dev10_609271.cs \
|
||||
@@ -3650,6 +3679,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/generics/negativegenerics.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/miscellaneous/co6010delegateequalstwo.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/miscellaneous/co6031gethashcode.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/guid/guid_parsing.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/lazyt/lazyttf.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/text/encoding/shift_jis.cs \
|
||||
@@ -3973,15 +4003,6 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
# this test makes no sense, the expected pattern is the English one for all cultures
|
||||
CORECLR_DISABLED_TEST_CS_SRC += $(CORECLR_PATH)/tests/src/Regressions/coreclr/0584/test584.cs
|
||||
|
||||
# Requires precise stack scanning
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs
|
||||
|
||||
# Depends on small array behavior of .net. Mono supports objects > 2Gb on 64bits and the following tests verify for that
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs
|
||||
|
||||
CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/BBT/Scenario4/Not-Int32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/Convert/implicitConv.il \
|
||||
@@ -4003,6 +4024,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/Box_Unbox.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/Desktop/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/array_tests.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/cpblk.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/field_tests.il \
|
||||
@@ -4013,6 +4035,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/ldloca.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/Box_Unbox.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/array_tests.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/cpblk.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/field_tests.il \
|
||||
@@ -4024,6 +4047,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/Box_Unbox.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/Desktop/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/array_tests.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/cpblk.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/field_tests.il \
|
||||
@@ -4035,6 +4059,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/Box_Unbox.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/Desktop/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/add.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/array_tests.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/cpblk.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/field_tests.il \
|
||||
@@ -4048,6 +4073,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/array-il/simple3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badendfinally.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badtailcall.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/calli2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ceeillegal.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ldelemnullarr2.il \
|
||||
@@ -4061,12 +4087,14 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilldind.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilstind.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/arrgetlen.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldsshrstsfld.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldvirtftncalli.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovfldiv2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovflrem2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly3.il \
|
||||
@@ -4076,9 +4104,13 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/catch1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/catch2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/catch3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/try1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/try2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/try3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/refbyref/byrefconvert.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/nativeint.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/nativeuint.il \
|
||||
@@ -4087,9 +4119,11 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/throwbox/finally.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/throwbox/rethrow.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/Dev10_863995.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_byte.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_int32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_int64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_struct.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_uint32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_uint64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/tail.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Generics/ConstrainedCall/vt1.il \
|
||||
@@ -4118,6 +4152,9 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_i4_u4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_i8_i4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_i8_u8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_u4_i.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_u4_i4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_u4_u1.il \
|
||||
@@ -4149,6 +4186,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_sub_ovf_u2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_sub_ovf_u4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_sub_ovf_u8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/huge_struct.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/lcs/lcs_ldlen.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/lengthm2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/selfref.il \
|
||||
@@ -4190,8 +4228,11 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/u_vfld.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/FPtrunc/convr4d.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/FPtrunc/convr8d.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param1b.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param1c.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param3b.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param3c.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25paramMixed.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/SEH/catchfault.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/SEH/catchfault_jmp.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/SEH/catchfault_tail.il \
|
||||
@@ -4220,9 +4261,13 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/fptr/virtftn_t.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/fr4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/fr8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/i4u2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/i4u4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/i8u8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/ii1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/ii2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/ii4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/iu2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/iu4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/objref.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/thiscall/thisnull.il \
|
||||
@@ -4263,6 +4308,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/casts/iface/iface2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/casts/ilseq/typeEqualOp.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/misc/deadlock.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/simple/Desktop/prefldinit3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/simple/prefldinit1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/simple/prefldinit2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/simple/prefldinit4.il \
|
||||
@@ -4302,6 +4348,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/flowgraph/dev10_bug679955/indexMinusOne.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/flowgraph/dev10_bug679955/volatileLocal1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/flowgraph/dev10_bug679955/volatileLocal2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/int64/arrays/hugedim.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/int64/arrays/lcs_long.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/int64/arrays/lcs_ulong.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/int64/misc/binop.il \
|
||||
@@ -4336,6 +4383,8 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/nonvirtualcall/valuetype.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/array1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/array2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/array3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/native.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/seq.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/stress2.il \
|
||||
@@ -4348,6 +4397,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/compat_obj.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/compat_v.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_array.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_array_nz.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_gc.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_inst.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_value.il \
|
||||
@@ -4369,6 +4419,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/varargs/callconv/gc_ctor.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/varargs/callconv/val_ctor.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/varargs/misc/Dev10_615402.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxblk/cpblk3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxblk/initblk3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxobj/ldobj/ldobj_I.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxobj/ldobj/ldobj_I8.il \
|
||||
@@ -4382,6 +4433,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxobj/operand/refanyval.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxobj/operand/unbox.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M09.5-PDC/b16935/b16935.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M11-Beta1/b44018/b44018.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M11-Beta1/b45046/b45046.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M12-Beta2/b26323/b26323.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M12-Beta2/b35455/b35455.il \
|
||||
@@ -4444,6 +4496,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16881/b16881a.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16881/b16881b.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16886/b16886.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16895/b16895.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16896/b16896.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16922/b16922.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16928/b16928.il \
|
||||
@@ -4452,6 +4505,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b20217/b20217.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b20249/b20249.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25458/b25458.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25459/b25459.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25463/b25463.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25468/b25468-ia64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25474/b25474.il \
|
||||
@@ -4477,15 +4531,19 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27657/b27657.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27658/b27658.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27880/b27880.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27883/b27883.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27917/b27917.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28080/b28080.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28522/b28522.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28594/b28594.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28595/b28595.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28596/b28596.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28597/b28597.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28805/b28805.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28806/b28806.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28927/b28927.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b29583/b29583.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b30125/b30125.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b30792/b30792.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b30799/b30799.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b30838/b30838.il \
|
||||
@@ -4533,12 +4591,14 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b05933/b05933.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06435/b06435.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06436/b06436.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06595/b06595.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06730/b06730.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06754/b06754.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b07082/b07082.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b07411/b07411.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b07458/b07458.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b07704/b07704.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b08107/b08107.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b08109/b08109.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b08672/b08672.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b08797/b08797.il \
|
||||
@@ -4617,6 +4677,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b28598/b28598.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b28949/b28949a.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b30868/b30868.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b31283/b31283.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b31289/b31289.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b31292/b31292.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b31423/b31423.il \
|
||||
@@ -4762,12 +4823,14 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70335/b70335.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70354/b70354.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70808/b70808.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70909/b70909.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70964/b70964.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70967/b70967.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70992/b70992.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70994/b70994.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71003/b71003.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71179/b71179.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71318/b71318.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71722/b71722.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71831/b71831.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71869/b71869.il \
|
||||
@@ -4846,9 +4909,14 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b14617/b14617.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b15617/arrayDim.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M01/b18049/loop2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/vc178279.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b118260/b118260.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b138117/ldsfldainitonlyvt.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b309555/x86-test-1084346006.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b323557/1087985874.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b353858/b353858.il \
|
||||
@@ -4856,6 +4924,8 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b409617/b409617.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b415164/b415164.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423755/Desktop/b423755.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b471305/b471305.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b475589/b475589.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b489329/b489329.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b518440/b518440.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b598031/test.il \
|
||||
@@ -4867,10 +4937,12 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b173313/b173313.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b193264/b193264.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/v2.1/b48850/b48850.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_468598/Test_HndIndex_10_Reordered.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131_byte.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131_fld.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131_intptr.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131_struct.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/DevDiv2_11321/DevDiv2_11321.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/External/Dev11_90434/UseUnalignedDouble.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/M00/b102759/b102759.il \
|
||||
@@ -4948,6 +5020,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-Beta2/b450688/b450688.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V2.0-RTM/b460385/b460385.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/clr-x64-JIT/v4.0/b602182/b602182.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/v4/dev10_804810/dev10_804810.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_large.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/localloc/zeroinit/zeroinit01_small.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cg/il/jmp.il \
|
||||
@@ -4969,6 +5042,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/118414/118414.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/127931/127931.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/phoenix/62322/test.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/vsw/102974/test.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/vsw/153682/test.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/vsw/266693/test.il \
|
||||
@@ -5044,106 +5118,6 @@ CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28901/b28901.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/clr-x64-JIT/v2.1/b173569/b173569.il
|
||||
|
||||
|
||||
# Bad test that tries an implicit cast from int32 to byref
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il
|
||||
|
||||
# Bad test that tries to implicit cast from bytef to int32
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il
|
||||
|
||||
# Bad test that tries to assign a byref to a class to a byref of an interface that class implements
|
||||
# This is unsafe because the byref is mutable and would allow you to store the wrong type on that cell.
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il
|
||||
|
||||
|
||||
# FIXME: these tests are baselined, i.e. we don't have time to investigate
|
||||
# them right now but want to make sure we don't introduce new regressions
|
||||
# in the rest of the tests
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerbegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/action/actioninvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/comparison/comparisonendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/comparison/comparisonbegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimekind.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/eventhandler_generic/eventhandlerendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/gc/gcreregisterforfinalize.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfocompare.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoindexof.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoisprefix.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfoissuffix.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/compareinfo/compareinfolastindexof.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/globalization/regioninfo/regioninfocurrentregion.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/io/filestream/filestreamdispose.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/predicate/predicateendinvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/predicate/predicatebegininvoke.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/runtime/interopservices/marshal/marshalsizeof2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringcompareto1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals1.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals2.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/string/stringequals3.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/weakreference/weakreferencetargetb.cs \
|
||||
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/regressions/devdivbugs/113347/ddb113347.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/misc/arrres.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b268908/vars2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/VS-ia64-JIT/V1.2-M02/b10828/redundant.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/cse/HugeField1.cs
|
||||
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/1/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/2/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/unaligned/4/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/PREFIX/volatile/1/arglist64.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/leave/filter3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/refbyref/byrefconvert.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_byte.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/zeroinit/init_uint32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i4.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/IL_Conformance/Old/Conformance_Base/ldc_conv_ovf_r8_i8.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Arrays/huge_struct.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param3b.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25paramMixed.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/i4u2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/ii1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/iu2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/implicit/ii2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/cctor/simple/Desktop/prefldinit3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/int64/arrays/hugedim.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/tailcall/deep_array_nz.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/array3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/refany/array2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/xxblk/cpblk3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-EJIT/V1-M11-Beta1/b44018/b44018.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b16895/b16895.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b25459/b25459.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27883/b27883.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b27917/b27917.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28597/b28597.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b30125/b30125.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b08107/b08107.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M10/b06595/b06595.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b31283/b31283.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b70909/b70909.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M12-Beta2/b71318/b71318.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b102962/t2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1.2-M02/b115932/t1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b091942/nullref.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b471305/b471305.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-RTM/b475589/b475589.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_468598/Test_HndIndex_10_Reordered.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/Dev11/Dev11_b473131/b473131_struct.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/v4/dev10_804810/dev10_804810.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/phoenix/62322/test.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Methodical/Invoke/25params/25param1b.il
|
||||
|
||||
|
||||
# find all CoreCLR *.il test files that aren't mentioned in this file
|
||||
CORECLR_DEFINED_IL_SRC = $(CORECLR_TEST_IL_SRC) $(CORECLR_DISABLED_TEST_IL_SRC)
|
||||
CORECLR_UPSTREAM_IL_SRC=$(shell find "$(CORECLR_PATH)/tests" -iname "*.il")
|
||||
@@ -5172,13 +5146,13 @@ $(CORECLR_PATH)%_il.exe: $(CORECLR_PATH)%.il
|
||||
$(ILASM) -out:$@ $<
|
||||
|
||||
coreclr-testlibrary.dll: $(CORECLR_TESTLIBRARY_CS_SRC)
|
||||
$(MCS) -unsafe -debug:portable -target:library -d:WINCORESYS -d:MONO -out:$@ $(CORECLR_TESTLIBRARY_CS_SRC)
|
||||
$(MCS) -unsafe -debug -target:library -d:WINCORESYS -d:MONO -out:$@ $(CORECLR_TESTLIBRARY_CS_SRC)
|
||||
|
||||
$(CORECLR_PATH)%.exe: $(CORECLR_PATH)%.cs coreclr-testlibrary.dll
|
||||
$(MCS) -unsafe -debug:portable -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 -nowarn:0197 -r:coreclr-testlibrary.dll -d:MONO -out:$@ $<
|
||||
$(MCS) -unsafe -debug -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 -nowarn:0197 -r:coreclr-testlibrary.dll -d:MONO -out:$@ $<
|
||||
|
||||
test-runner.exe: $(top_srcdir)/mono/tests/test-runner.cs
|
||||
$(MCS) -debug:portable -r:Mono.Posix.dll -out:$@ $<
|
||||
$(MCS) -debug -r:Mono.Posix.dll -out:$@ $<
|
||||
|
||||
GCStressTests.exe: $(CORECLR_STRESSTEST_RUNNER_CS_SRC)
|
||||
$(MCS) -out:$@ -debug:portable -d:PROJECTK_BUILD $(CORECLR_STRESSTEST_RUNNER_CS_SRC)
|
||||
$(MCS) -out:$@ -debug -d:PROJECTK_BUILD $(CORECLR_STRESSTEST_RUNNER_CS_SRC)
|
||||
@@ -1,13 +1,10 @@
|
||||
check-ms-test-suite: $(CLASS)/nunitlite.dll
|
||||
check-ms-test-suite:
|
||||
@if $(MAKE) validate-ms-test-suite RESET_VERSIONS=1; then \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -debug:portable -t:library -warn:1 -r:$(CLASS)/nunitlite.dll" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-lite-console.exe -exclude=MonoBug,BadTest -format:nunit2" NUNIT_XML_RESULT="-result:$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml" || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug:portable -warn:1" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance build MCS="$(MCS) -t:library -warn:1 -r:nunit.framework" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/conformance run NUNIT-CONSOLE="$(RUNTIME) $(CLASS)/nunit-console.exe -nologo -exclude=MonoBug,BadTest" NUNIT_XML_RESULT=$(abs_top_builddir)/acceptance-tests/TestResult-ms-test-suite-conformance.xml || EXIT_CODE=1; \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup build MCS="$(MCS) -debug -warn:1" && \
|
||||
$(MAKE) -C $(MSTESTSUITE_PATH)/systemruntimebringup run MONO="$(RUNTIME)" || EXIT_CODE=1; \
|
||||
exit $$EXIT_CODE; \
|
||||
else \
|
||||
echo "*** [ms-test-suite] Getting the repository failed, you probably don't have access to this Xamarin-internal resource. Skipping."; \
|
||||
fi
|
||||
|
||||
$(CLASS)/nunitlite.dll:
|
||||
$(MAKE) -C $(mcs_topdir)/tools/nunit-lite
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
SYS_REFS = \
|
||||
System.dll \
|
||||
System.Core.dll \
|
||||
System.Data.dll \
|
||||
System.Runtime.Serialization.dll \
|
||||
System.Xml.dll \
|
||||
System.Xml.Linq.dll \
|
||||
Mono.Posix.dll
|
||||
|
||||
check-profiler-stress:
|
||||
@$(MAKE) validate-benchmarker RESET_VERSIONS=1
|
||||
cd profiler-stress && $(MCS) -debug -define:ARCH_$(arch_target) -target:exe $(addprefix -r:, $(SYS_REFS)) -out:runner.exe @runner.exe.sources
|
||||
cd profiler-stress && $(RUNTIME) runner.exe
|
||||
@@ -1,346 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using Mono.Unix.Native;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// Shut up CLS compliance warnings from Json.NET.
|
||||
[assembly: CLSCompliant (true)]
|
||||
|
||||
namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
// https://github.com/xamarin/benchmarker/blob/master/tools/libdbmodel/Benchmark.cs
|
||||
sealed class Benchmark {
|
||||
|
||||
public string Name { get; set; }
|
||||
public string TestDirectory { get; set; }
|
||||
public bool OnlyExplicit { get; set; }
|
||||
public string[] CommandLine { get; set; }
|
||||
public string[] ClientCommandLine { get; set; }
|
||||
public string[] AOTAssemblies { get; set; }
|
||||
|
||||
public static Benchmark Load (string file)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Benchmark> (File.ReadAllText (file));
|
||||
}
|
||||
}
|
||||
|
||||
sealed class TestResult {
|
||||
|
||||
public Benchmark Benchmark { get; set; }
|
||||
public ProcessStartInfo StartInfo { get; set; }
|
||||
public Stopwatch Stopwatch { get; set; } = new Stopwatch ();
|
||||
public int? ExitCode { get; set; }
|
||||
public string StandardOutput { get; set; }
|
||||
public string StandardError { get; set; }
|
||||
}
|
||||
|
||||
static class Program {
|
||||
|
||||
static readonly string[] _options = new [] {
|
||||
"exception",
|
||||
"monitor",
|
||||
"gc",
|
||||
"gcalloc",
|
||||
"gcmove",
|
||||
"gcroot",
|
||||
"gchandle",
|
||||
"finalization",
|
||||
"counter",
|
||||
"jit",
|
||||
};
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (8);
|
||||
|
||||
static readonly Dictionary<string, Predicate<Benchmark>> _filters = new Dictionary<string, Predicate<Benchmark>> {
|
||||
{ "ironjs-v8", FilterArmArchitecture },
|
||||
};
|
||||
|
||||
static readonly Dictionary<string, Action<TestResult>> _processors = new Dictionary<string, Action<TestResult>> {
|
||||
{ "msbiology", Process32BitOutOfMemory },
|
||||
};
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static bool FilterArmArchitecture (Benchmark benchmark)
|
||||
{
|
||||
#if ARCH_arm || ARCH_arm64
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Process32BitOutOfMemory (TestResult result)
|
||||
{
|
||||
if (Environment.Is64BitProcess)
|
||||
return;
|
||||
|
||||
if (result.ExitCode == null || result.ExitCode == 0)
|
||||
return;
|
||||
|
||||
if (result.StandardError.Contains ("OutOfMemoryException"))
|
||||
result.ExitCode = 0;
|
||||
}
|
||||
|
||||
static bool IsSupported (Benchmark benchmark)
|
||||
{
|
||||
return _filters.TryGetValue (benchmark.Name, out var filter) ? filter (benchmark) : true;
|
||||
}
|
||||
|
||||
static int Main ()
|
||||
{
|
||||
var depDir = Path.Combine ("..", "external", "benchmarker");
|
||||
var benchDir = Path.Combine (depDir, "benchmarks");
|
||||
var testDir = Path.Combine (depDir, "tests");
|
||||
|
||||
var benchmarks = Directory.EnumerateFiles (benchDir, "*.benchmark")
|
||||
.Select (Benchmark.Load)
|
||||
.Where (b => !b.OnlyExplicit && b.ClientCommandLine == null && IsSupported (b))
|
||||
.OrderBy (b => b.Name)
|
||||
.ToArray ();
|
||||
|
||||
var monoPath = Path.GetFullPath (Path.Combine ("..", "..", "runtime", "mono-wrapper"));
|
||||
var classDir = Path.GetFullPath (Path.Combine ("..", "..", "mcs", "class", "lib", "net_4_x"));
|
||||
|
||||
var rand = new Random ();
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
var results = new List<TestResult> (benchmarks.Length);
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
for (var i = 0; i < benchmarks.Length; i++) {
|
||||
var bench = benchmarks [i];
|
||||
|
||||
var sampleFreq = rand.Next (-1000, 1001);
|
||||
var sampleMode = rand.Next (0, 2) == 1 ? "-real" : string.Empty;
|
||||
var maxSamples = rand.Next (0, cpus * 2000 + 1);
|
||||
var heapShotFreq = rand.Next (-10, 11);
|
||||
var maxFrames = rand.Next (0, 33);
|
||||
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
|
||||
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
|
||||
.ToArray ();
|
||||
|
||||
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
|
||||
|
||||
if (sampleFreq > 0)
|
||||
profOptions += $",sample{sampleMode}={sampleFreq},maxsamples={maxSamples}";
|
||||
|
||||
if (heapShotFreq > 0)
|
||||
profOptions += $",heapshot={heapShotFreq}gc";
|
||||
|
||||
var info = new ProcessStartInfo {
|
||||
UseShellExecute = false,
|
||||
WorkingDirectory = Path.Combine (testDir, bench.TestDirectory),
|
||||
FileName = monoPath,
|
||||
Arguments = $"--debug --profile=log:{profOptions} " + string.Join (" ", bench.CommandLine),
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
};
|
||||
|
||||
info.EnvironmentVariables.Clear ();
|
||||
info.EnvironmentVariables.Add ("MONO_PATH", classDir);
|
||||
|
||||
var progress = $"({i + 1}/{benchmarks.Length})";
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} Running {bench.Name} with profiler options: {profOptions}");
|
||||
Console.ResetColor ();
|
||||
|
||||
var result = new TestResult {
|
||||
Benchmark = bench,
|
||||
StartInfo = info,
|
||||
};
|
||||
|
||||
using (var proc = new Process ()) {
|
||||
proc.StartInfo = info;
|
||||
|
||||
var stdout = new StringBuilder ();
|
||||
var stderr = new StringBuilder ();
|
||||
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result)
|
||||
stdout.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
lock (result)
|
||||
stderr.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
result.Stopwatch.Start ();
|
||||
|
||||
proc.Start ();
|
||||
|
||||
proc.BeginOutputReadLine ();
|
||||
proc.BeginErrorReadLine ();
|
||||
|
||||
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
|
||||
// Force a thread dump.
|
||||
Syscall.kill (proc.Id, Signum.SIGQUIT);
|
||||
Thread.Sleep (1000);
|
||||
|
||||
try {
|
||||
proc.Kill ();
|
||||
} catch (Exception) {
|
||||
}
|
||||
} else
|
||||
result.ExitCode = proc.ExitCode;
|
||||
|
||||
result.Stopwatch.Stop ();
|
||||
|
||||
lock (result) {
|
||||
result.StandardOutput = stdout.ToString ();
|
||||
result.StandardError = stderr.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}";
|
||||
|
||||
Console.ForegroundColor = result.ExitCode != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} {bench.Name} took {result.Stopwatch.Elapsed.ToString ("G")} and {resultStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardOutput);
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError);
|
||||
}
|
||||
|
||||
if (_processors.TryGetValue (bench.Name, out var processor))
|
||||
processor (result);
|
||||
|
||||
results.Add (result);
|
||||
}
|
||||
|
||||
sw.Stop ();
|
||||
|
||||
var successes = results.Count (r => r.ExitCode == 0);
|
||||
var failures = results.Count (r => r.ExitCode != null && r.ExitCode != 0);
|
||||
var timeouts = results.Count (r => r.ExitCode == null);
|
||||
|
||||
var settings = new XmlWriterSettings {
|
||||
NewLineOnAttributes = true,
|
||||
Indent = true,
|
||||
};
|
||||
|
||||
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
|
||||
writer.WriteStartDocument ();
|
||||
writer.WriteComment ("This file represents the results of running a test suite");
|
||||
|
||||
writer.WriteStartElement ("test-results");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("total", results.Count.ToString ());
|
||||
writer.WriteAttributeString ("failures", failures.ToString ());
|
||||
writer.WriteAttributeString ("not-run", "0");
|
||||
writer.WriteAttributeString ("date", DateTime.Now.ToString ("yyyy-MM-dd"));
|
||||
writer.WriteAttributeString ("time", DateTime.Now.ToString ("HH:mm:ss"));
|
||||
|
||||
writer.WriteStartElement ("environment");
|
||||
writer.WriteAttributeString ("nunit-version", "2.4.8.0");
|
||||
writer.WriteAttributeString ("clr-version", Environment.Version.ToString ());
|
||||
writer.WriteAttributeString ("os-version", Environment.OSVersion.ToString ());
|
||||
writer.WriteAttributeString ("platform", Environment.OSVersion.Platform.ToString ());
|
||||
writer.WriteAttributeString ("cwd", Environment.CurrentDirectory);
|
||||
writer.WriteAttributeString ("machine-name", Environment.MachineName);
|
||||
writer.WriteAttributeString ("user", Environment.UserName);
|
||||
writer.WriteAttributeString ("user-domain", Environment.UserDomainName);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("culture-info");
|
||||
writer.WriteAttributeString ("current-culture", CultureInfo.CurrentCulture.Name);
|
||||
writer.WriteAttributeString ("current-uiculture", CultureInfo.CurrentUICulture.Name);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "MonoTests");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
foreach (var result in results) {
|
||||
var timeoutStr = result.ExitCode == null ? "_timeout" : string.Empty;
|
||||
|
||||
writer.WriteStartElement ("test-case");
|
||||
writer.WriteAttributeString ("name", $"MonoTests.profiler-stress.{result.Benchmark.Name}{timeoutStr}");
|
||||
writer.WriteAttributeString ("executed", "True");
|
||||
writer.WriteAttributeString ("success", (result.ExitCode == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) result.Stopwatch.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", result.ExitCode == 0 ? "0" : "1");
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
writer.WriteStartElement ("failure");
|
||||
|
||||
writer.WriteStartElement ("message");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("stack-trace");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardError));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndDocument ();
|
||||
}
|
||||
|
||||
var failureStr = failures + timeouts != 0 ? $" ({failures} failures, {timeouts} timeouts)" : string.Empty;
|
||||
|
||||
Console.ForegroundColor = failures + timeouts != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Finished with {successes}/{results.Count} passing tests{failureStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
return failures + timeouts;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonBinaryWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Bson/BsonObjectId.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BinaryConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataSetConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DataTableConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/CustomCreationConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/DateTimeConverterBase.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/EntityKeyMemberConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/KeyValuePairConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/BsonObjectIdConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/RegexConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/StringEnumConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ConstructorHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/VersionConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateFormatHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DateTimeZoneHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Formatting.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConstructorAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPosition.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyKeyedCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxy.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPath.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JRaw.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Required.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDynamicContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonFormatterConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonISerializableContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonLinqContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPrimitiveContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DynamicValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorEventArgs.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JPropertyDescriptor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultReferenceResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/PreserveReferencesHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/IJsonLineInfo.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonArrayAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonContainerAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/DefaultValueHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonObjectAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializerSettings.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonValidatingReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/IJEnumerable.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenEqualityComparer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MemberSerialization.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ObjectCreationHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/IsoDateTimeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/JavaScriptDateTimeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Converters/XmlNodeConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonPropertyAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonIgnoreAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonTextWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriterException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReaderException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConverterCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonConvert.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializationException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonSerializer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/Extensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JConstructor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JContainer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JEnumerable.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JObject.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JArray.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JProperty.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JTokenType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Linq/JValue.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/Extensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaException.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModel.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaModelBuilder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNodeCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaNode.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/UndefinedSchemaIdHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventArgs.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/ValidationEventHandler.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CamelCasePropertyNamesContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/DefaultSerializationBinder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ErrorContext.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IContractResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonArrayContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonDictionaryContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonProperty.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonPropertyCollection.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/MissingMemberHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/NullValueHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/ReferenceLoopHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchema.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaBuilder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaConstants.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/IReferenceResolver.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Schema/JsonSchemaType.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonObjectContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalBase.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonSerializerProxy.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonStringContract.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/JsonTypeReflector.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/CachedAttributeGetter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/LateBoundMetadataTypeAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ReflectionValueProvider.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/OnErrorAttribute.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/Base64Encoder.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicProxyMetaObject.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DynamicReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Serialization/ObjectConstructor.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ILGeneratorExtensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/LateBoundReflectionDelegateFactory.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MethodCall.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringReference.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ThreadSafeStore.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/TypeNameHandling.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/BidirectionalDictionary.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DateTimeUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/DictionaryWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValue.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/EnumValues.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/JavaScriptUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonToken.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/JsonWriter.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringBuffer.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/CollectionUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ListWrapper.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MathUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/MiscellaneousUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/StringUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/ValidationUtils.cs
|
||||
../../external/Newtonsoft.Json/Src/Newtonsoft.Json/WriteState.cs
|
||||
runner.cs
|
||||
@@ -4,11 +4,17 @@ check-roslyn:
|
||||
sed -i -e 's/\\4.5-api"/\\4.5"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
export MSBuildExtensionsPath=$$PREFIX/lib/mono/xbuild; \
|
||||
MONO_DOTNET_PORTABLE_DIR=$$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v4.6" ]; then \
|
||||
MONO_NUGET_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/NuGet/; \
|
||||
MONO_PORTABLE_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/Portable/v5.0; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v5.0" ]; then \
|
||||
mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
mkdir -p $$MONO_NUGET_TARGETS_DIR; \
|
||||
mkdir -p $$MONO_PORTABLE_TARGETS_DIR; \
|
||||
curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
|
||||
unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
|
||||
cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
cp /tmp/RoslynBuildDependencies/NuGetTargets/* $$MONO_NUGET_TARGETS_DIR; \
|
||||
cp /tmp/RoslynBuildDependencies/PortableTargets/* $$MONO_PORTABLE_TARGETS_DIR; \
|
||||
fi; \
|
||||
cd $(ROSLYN_PATH); \
|
||||
sed -i -e 'N; s/bootstrapArg=".*\n.*"/bootstrapArg=""/g' cibuild.sh; \
|
||||
|
||||
@@ -3,35 +3,28 @@
|
||||
SUBMODULES_CONFIG_FILE = $(top_srcdir)/acceptance-tests/SUBMODULES.json
|
||||
include $(top_srcdir)/scripts/submodules/versions.mk
|
||||
|
||||
$(eval $(call ValidateVersionTemplate,benchmarker,BENCHMARKER))
|
||||
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
|
||||
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
|
||||
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
|
||||
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-benchmarker: __bump-benchmarker
|
||||
bump-roslyn: __bump-version-roslyn
|
||||
bump-coreclr: __bump-version-coreclr
|
||||
bump-ms-test-suite: __bump-version-ms-test-suite
|
||||
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-branch-benchmarker: __bump-branch-benchmarker
|
||||
bump-branch-roslyn: __bump-branch-roslyn
|
||||
bump-branch-coreclr: __bump-branch-coreclr
|
||||
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
|
||||
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-current-benchmarker: __bump-current-benchmarker
|
||||
bump-current-roslyn: __bump-current-version-roslyn
|
||||
bump-current-coreclr: __bump-current-version-coreclr
|
||||
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
|
||||
|
||||
commit-bump-benchmarker:
|
||||
$(MAKE) bump-benchmarker COMMIT=1
|
||||
|
||||
commit-bump-roslyn:
|
||||
$(MAKE) bump-roslyn COMMIT=1
|
||||
|
||||
@@ -41,9 +34,6 @@ commit-bump-coreclr:
|
||||
commit-bump-ms-test-suite:
|
||||
$(MAKE) bump-ms-test-suite COMMIT=1
|
||||
|
||||
commit-bump-current-benchmarker:
|
||||
$(MAKE) bump-current-benchmarker COMMIT=1
|
||||
|
||||
commit-bump-current-roslyn:
|
||||
$(MAKE) bump-current-roslyn COMMIT=1
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
#
|
||||
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
|
||||
#
|
||||
# For further details see http://www.appveyor.com
|
||||
#
|
||||
|
||||
#
|
||||
# Custom environment variables
|
||||
#
|
||||
environment:
|
||||
global:
|
||||
CYG_ROOT: C:\cygwin
|
||||
CYG_MIRROR: http://cygwin.mirror.constant.com
|
||||
CYG_CACHE: C:\cygwin\var\cache\setup
|
||||
CYG_BASH: C:\cygwin\bin\bash
|
||||
|
||||
#
|
||||
# Cache Cygwin files to speed up build
|
||||
#
|
||||
cache:
|
||||
- '%CYG_CACHE%'
|
||||
|
||||
#
|
||||
# Do a shallow clone of the repo to speed up build
|
||||
#
|
||||
clone_depth: 1
|
||||
|
||||
#
|
||||
# Initialisation prior to pulling the Mono repository
|
||||
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
|
||||
#
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
|
||||
#
|
||||
# Install needed build dependencies
|
||||
#
|
||||
install:
|
||||
- ps: 'Start-FileDownload "http://cygwin.com/setup-x86.exe" -FileName "setup-x86.exe"'
|
||||
- 'setup-x86.exe --quiet-mode --no-shortcuts --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages autoconf,automake,bison,gcc-core,gcc-g++,mingw-runtime,mingw-binutils,mingw-gcc-core,mingw-gcc-g++,mingw-pthreads,mingw-w32api,libtool,make,python,gettext-devel,gettext,intltool,libiconv,pkg-config,git,curl,libxslt > NUL 2>&1'
|
||||
- '%CYG_BASH% -lc "cygcheck -dc cygwin"'
|
||||
|
||||
# Cygwin build script
|
||||
#
|
||||
# NOTES:
|
||||
#
|
||||
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
|
||||
# build which causes failures as certain functions attempt to redirect
|
||||
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
|
||||
#
|
||||
build_script:
|
||||
- 'echo Building...'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./autogen.sh --prefix=/usr/local --host=i686-pc-mingw32"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
|
||||
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make -j2"'
|
||||
- 'echo Installing...'
|
||||
- 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
|
||||
- '%CYG_BASH% -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
|
||||
|
||||
#
|
||||
# Disable tests for now
|
||||
#
|
||||
test: off
|
||||
|
||||
#
|
||||
# Only build the master branch
|
||||
#
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
#
|
||||
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
|
||||
# It has to be relative to the project path. Thus we have installed to within the build tree.
|
||||
#
|
||||
artifacts:
|
||||
- path: install
|
||||
name: mono-binaries
|
||||
type: zip
|
||||
+7
-2
@@ -154,10 +154,15 @@ if test -d $srcdir/libgc; then
|
||||
echo Done running libgc/autogen.sh ...
|
||||
fi
|
||||
|
||||
if test x$MONO_EXTRA_CONFIGURE_FLAGS != x; then
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
if test -d $srcdir/eglib; then
|
||||
echo Running eglib/autogen.sh ...
|
||||
(cd $srcdir/eglib ; NOCONFIGURE=1 ./autogen.sh "$@")
|
||||
echo Done running eglib/autogen.sh ...
|
||||
fi
|
||||
|
||||
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
|
||||
conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
@echo off
|
||||
cd mcs\jay
|
||||
vcbuild jay.vcxproj
|
||||
cd msvc\scripts
|
||||
csc prepare.cs
|
||||
prepare.exe ..\..\mcs core
|
||||
msbuild net_4_x.sln
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
(cd mcs/jay; make)
|
||||
(cd msvc/scripts/; make prepare.exe; mono prepare.exe ../../mcs core)
|
||||
(cd msvc/scripts/; make prepare.exe; mono prepare.exe `pwd`/mcs core)
|
||||
msbuild net_4_x.sln
|
||||
+303
-1013
File diff suppressed because it is too large.
Load diff
@@ -11,21 +11,14 @@
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
|
||||
<dllmap dll="libX11" target="@X11@" os="!windows" />
|
||||
<dllmap dll="libgdk-x11-2.0" target="@GDKX11@" os="!windows"/>
|
||||
<dllmap dll="libgdk_pixbuf-2.0" target="libgdk_pixbuf-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgtk-x11-2.0" target="@GTKX11@" os="!windows"/>
|
||||
<dllmap dll="libglib-2.0" target="libglib-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgobject-2.0" target="libgobject-2.0.so.0" os="!windows"/>
|
||||
<dllmap dll="libgnomeui-2" target="libgnomeui-2.so.0" os="!windows"/>
|
||||
<dllmap dll="librsvg-2" target="librsvg-2.so.2" os="!windows"/>
|
||||
<dllmap dll="libXinerama" target="@XINERAMA@" os="!windows" />
|
||||
<dllmap dll="libasound" target="libasound.so.2" os="!windows" />
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
|
||||
<dllmap dll="libcairo-2.dll" target="libcairo.2.dylib" os="osx"/>
|
||||
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
|
||||
|
||||
@@ -167,6 +167,8 @@ class MonoClassPrinter:
|
||||
return "0x0"
|
||||
klass = self.val.dereference ()
|
||||
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
|
||||
if klass ["generic_class"].cast (gdb.lookup_type ("guint64")) != 0:
|
||||
class_name = "{}<{}>".format (class_name, str (klass ["generic_class"]["context"]["class_inst"]))
|
||||
if add_quotes:
|
||||
return "\"{}\"".format (class_name)
|
||||
else:
|
||||
@@ -196,7 +198,7 @@ class MonoGenericInstPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
# print (inst_args)
|
||||
print (inst_args)
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
@@ -238,7 +240,7 @@ class MonoTypePrinter:
|
||||
|
||||
def to_string_inner(self, csharp):
|
||||
try:
|
||||
t = self.val.referenced_value ()
|
||||
t = self.val.dereference ()
|
||||
|
||||
kind = str (t ["type"]).replace ("MONO_TYPE_", "").lower ()
|
||||
info = ""
|
||||
@@ -250,9 +252,9 @@ class MonoTypePrinter:
|
||||
info = str(t ["data"]["generic_class"])
|
||||
|
||||
if info != "":
|
||||
return "{{{}, {}}}".format (kind, info)
|
||||
return "{{}, {}}".format (kind, info)
|
||||
else:
|
||||
return "{{{}}}".format (kind)
|
||||
return "{{}}".format (kind)
|
||||
except:
|
||||
#print (sys.exc_info ()[0])
|
||||
#print (sys.exc_info ()[1])
|
||||
@@ -276,7 +278,7 @@ class MonoMethodRgctxPrinter:
|
||||
inst_args = inst ["type_argv"]
|
||||
inst_str = ""
|
||||
for i in range(0, inst_len):
|
||||
# print (inst_args)
|
||||
print (inst_args)
|
||||
type_printer = MonoTypePrinter (inst_args [i])
|
||||
if i > 0:
|
||||
inst_str = inst_str + ", "
|
||||
|
||||
+4
-27
@@ -9,38 +9,16 @@ def print_frames(thread, num_frames, current_thread):
|
||||
|
||||
for frame in thread.frames[:+num_frames]:
|
||||
pc = str(frame.addr)
|
||||
fmt = ' %c %s'
|
||||
var = frame
|
||||
function_name = frame.GetFunctionName()
|
||||
if function_name == "ves_exec_method_with_context":
|
||||
try:
|
||||
s = 'frame->runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
|
||||
ipoffset = frame.EvaluateExpression('ip').GetValueAsUnsigned()
|
||||
insn = ''
|
||||
if ipoffset != 0:
|
||||
ipoffset -= frame.EvaluateExpression('rtm->code').GetValueAsUnsigned()
|
||||
insn = "\"" + frame.EvaluateExpression('mono_interp_opname [*ip]').summary[1:-1] + "\""
|
||||
var = '%s::%s @ %d %s || %s' % (klassname, methodname, ipoffset, insn, frame)
|
||||
except Exception as e:
|
||||
print "DBG: execfail:" + str(e)
|
||||
elif function_name == "mono_interp_transform_method":
|
||||
try:
|
||||
s = 'runtime_method->method'
|
||||
klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
|
||||
methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
|
||||
var = 'transforming %s::%s || %s' % (klassname, methodname, frame)
|
||||
except Exception as e:
|
||||
print "DBG: transformfail:" + str(e)
|
||||
elif pc[0] == '0':
|
||||
if pc[0] == '0':
|
||||
try:
|
||||
framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
|
||||
var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
|
||||
except:
|
||||
pass
|
||||
|
||||
print ' %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
|
||||
|
||||
def monobt(debugger, command, result, dict):
|
||||
opts = {'all_bt': False, 'num_frames': None}
|
||||
@@ -75,5 +53,4 @@ def __lldb_init_module (debugger, dict):
|
||||
# This initializer is being run from LLDB in the embedded command interpreter
|
||||
# Add any commands contained in this module to LLDB
|
||||
debugger.HandleCommand('command script add -f monobt.monobt monobt')
|
||||
debugger.HandleCommand('command alias mbt monobt')
|
||||
print '"monobt" command installed'
|
||||
print '"monobt" command installed'
|
||||
@@ -86,7 +86,7 @@ LOCK RULES
|
||||
Simple locks:
|
||||
Can be acquired at any point regardless of which locks are taken or not.
|
||||
No other locks can be acquired or released while holding a simple lock.
|
||||
Reentrancy is not recommended. (warning)
|
||||
Reentrancy is not recomended. (warning)
|
||||
Simple locks are leaf locks on the lock lattice.
|
||||
|
||||
Complex locks:
|
||||
@@ -129,7 +129,7 @@ ERROR: tried to acquire lock DomainLock at mono_domain_code_reserve_align while
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_class_from_name
|
||||
WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_image_add_to_name_cache
|
||||
Both of those happen when filling up the name_cache, as it needs to alloc image memory.
|
||||
This one is fixable by splitting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriately.
|
||||
This one is fixable by spliting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriatedly.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -135,6 +135,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -138,6 +138,9 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
check-coverage crlf=input
|
||||
check-exports crlf=input
|
||||
produce-lists crlf=input
|
||||
@@ -9,4 +9,3 @@
|
||||
/mono-tools.tree
|
||||
/mono-tools.zip
|
||||
/AgilityPack.dll*
|
||||
/doxygen-output
|
||||
+1
-6
@@ -64,7 +64,6 @@ dist-hook:
|
||||
|
||||
clean-local:
|
||||
-rm -Rf html
|
||||
-rm -Rf doxygen-output
|
||||
-rm -f deploy/* convert.exe* AgilityPack.dll*
|
||||
-rm -f $(ASSEMBLED_DOCS)
|
||||
|
||||
@@ -87,7 +86,7 @@ mono-file-formats.zip: mono-file-formats.tree
|
||||
mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp
|
||||
$(TOOL_MAKE) $@
|
||||
|
||||
deploy/.stamp: convert.exe Makefile.am exdoc
|
||||
deploy/.stamp: convert.exe Makefile.am
|
||||
$(mkdir_p) html
|
||||
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
|
||||
MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
|
||||
@@ -101,7 +100,3 @@ convert.exe: convert.cs AgilityPack.dll
|
||||
AgilityPack.dll:
|
||||
$(TOOL_MAKE) AgilityPack.dll
|
||||
|
||||
doxygen:
|
||||
doxygen doxyfile
|
||||
|
||||
.PHONY: doxygen
|
||||
@@ -26,7 +26,7 @@ some combination of the two.
|
||||
|
||||
To be clearer, and give an idea of what the algorithm can and
|
||||
cannot do without describing it in detail... keep in mind that
|
||||
only "redundant" checks cannot be removed. By "redundant", I
|
||||
only "redunant" checks cannot be removed. By "redundant", I
|
||||
mean "already explicitly checked" in the method code.
|
||||
|
||||
Unfortunately, analyzing complex expressions is not so easy
|
||||
@@ -136,7 +136,7 @@ some combination of the two.
|
||||
In the first case, the BB has exactly two exit BBs, and their
|
||||
execution conditions are easy to get from the condition of the
|
||||
branch (see the "get_relation_from_branch_instruction"
|
||||
function, and especially the end of "analyze_block" in
|
||||
function, and expecially the end of "analyze_block" in
|
||||
abcremoval.c.
|
||||
|
||||
If there is a switch, the jump condition of every exit BB is
|
||||
@@ -303,7 +303,7 @@ some combination of the two.
|
||||
each BB tried to examine all possible conditions between all
|
||||
variables, filling a sort of "evaluation matrix". The problem
|
||||
was that the complexity of this evaluation was quadratic (or
|
||||
worse) on the number of variables, and that many variables
|
||||
worse) on the number of variables, and that many wariables
|
||||
were examined even if they were not involved in any array
|
||||
access.
|
||||
|
||||
@@ -332,7 +332,7 @@ some combination of the two.
|
||||
|
||||
[1b] Prepare the evaluation graph (empty)
|
||||
|
||||
[1b] Summarize each variable definition, and put
|
||||
[1b] Summarize each varible definition, and put
|
||||
the resulting relations in the evaluation
|
||||
graph
|
||||
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
ALPHABETICAL_INDEX = YES
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
AUTOLINK_SUPPORT = YES
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
CALLER_GRAPH = YES
|
||||
CALL_GRAPH = YES
|
||||
CASE_SENSE_NAMES = NO
|
||||
CLASS_DIAGRAMS = YES
|
||||
COLS_IN_ALPHA_INDEX = 1
|
||||
CREATE_SUBDIRS = NO
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_CLEANUP = YES
|
||||
DOT_IMAGE_FORMAT = svg
|
||||
DOT_MULTI_TARGETS = YES
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
ENABLE_PREPROCESSING = YES
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
EXTENSION_MAPPING = c=C h=C
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
FILE_PATTERNS = *.c *.h
|
||||
FULL_PATH_NAMES = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST = YES
|
||||
GENERATE_HTML = YES
|
||||
GENERATE_LEGEND = YES
|
||||
GENERATE_PERLMOD = NO
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TREEVIEW = YES
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
HAVE_DOT = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HTML_COLORSTYLE_GAMMA = 80
|
||||
HTML_COLORSTYLE_HUE = 220
|
||||
HTML_COLORSTYLE_SAT = 100
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_INDEX_NUM_ENTRIES = 100
|
||||
HTML_OUTPUT = doxygen
|
||||
HTML_TIMESTAMP = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INHERIT_DOCS = YES
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
INLINE_SOURCES = YES
|
||||
INPUT = ../mono
|
||||
INPUT_ENCODING = UTF-8
|
||||
INTERACTIVE_SVG = YES
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
MACRO_EXPANSION = NO
|
||||
MARKDOWN_SUPPORT = YES
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OUTPUT_DIRECTORY = doxygen-output
|
||||
OUTPUT_LANGUAGE = English
|
||||
PREDEFINED = "HAVE_SGEN_GC="
|
||||
PROJECT_NAME = "Mono"
|
||||
QT_AUTOBRIEF = NO
|
||||
QUIET = NO
|
||||
RECURSIVE = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REPEAT_BRIEF = YES
|
||||
SEARCHENGINE = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
SHORT_NAMES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_USED_FILES = YES
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
SORT_BRIEF_DOCS = YES
|
||||
SORT_GROUP_NAMES = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SOURCE_BROWSER = YES
|
||||
SOURCE_TOOLTIPS = YES
|
||||
STRIP_CODE_COMMENTS = NO
|
||||
TAB_SIZE = 4
|
||||
TREEVIEW_WIDTH = 250
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
USE_HTAGS = NO
|
||||
USE_MDFILE_AS_MAINPAGE = ../README.md
|
||||
VERBATIM_HEADERS = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
+259
-436
@@ -1,295 +1,91 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
# Options
|
||||
my $HELP = 0;
|
||||
my $SOURCE_DIR = '';
|
||||
my $TARGET_DIR = '';
|
||||
my $WARNINGS = 0;
|
||||
|
||||
GetOptions(
|
||||
"help" => \$HELP,
|
||||
"html|h=s" => \$SOURCE_DIR,
|
||||
"target|t=s" => \$TARGET_DIR,
|
||||
"warnings|W" => \$WARNINGS,
|
||||
) or pod2usage(1);
|
||||
|
||||
pod2usage(0) if $HELP;
|
||||
|
||||
exdoc();
|
||||
|
||||
#
|
||||
# Main entry point.
|
||||
#
|
||||
sub exdoc {
|
||||
my %templates = ();
|
||||
my %docs = ();
|
||||
my $stylesheet = load_stylesheet($SOURCE_DIR);
|
||||
load_templates($SOURCE_DIR, \%templates);
|
||||
process_source_files(\%docs);
|
||||
merge(\%docs, \%templates, \$stylesheet);
|
||||
if ($ARGV[0] eq "-h"){
|
||||
$sourcedir = $ARGV[1];
|
||||
$dir = $sourcedir;
|
||||
$html = 1;
|
||||
shift @ARGV;
|
||||
shift @ARGV;
|
||||
}
|
||||
open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
|
||||
while (<FILE>){
|
||||
$css = $css . $_;
|
||||
}
|
||||
|
||||
#
|
||||
# Load CSS stylesheet.
|
||||
#
|
||||
sub load_stylesheet {
|
||||
my ($dir_path) = @_;
|
||||
my $file_path = "$dir_path/api-style.css";
|
||||
open (my $file, '<', $file_path) or die "Could not open $file_path";
|
||||
local $/;
|
||||
my $contents = <$file>;
|
||||
close $file;
|
||||
return $contents;
|
||||
if ($ARGV[0] eq "-t"){
|
||||
$dir = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
|
||||
#
|
||||
# Load HTML templates.
|
||||
#
|
||||
sub load_templates {
|
||||
my ($dir_path, $templates) = @_;
|
||||
opendir (my $dir, "$dir_path/sources/") or die "Could not open $dir_path";
|
||||
while (my $file_name = readdir ($dir)) {
|
||||
next if $file_name !~ /mono-api-.*\.html$/;
|
||||
open (my $file, "$dir_path/sources/$file_name") or die "Could not open $file_name";
|
||||
my $contents = '';
|
||||
my @api = ();
|
||||
while (<$file>) {
|
||||
$contents .= $_;
|
||||
if (/name="api:(.*?)"/) {
|
||||
s/.*name="api:(\w+?)".*/$1/;
|
||||
push @api, $_;
|
||||
}
|
||||
}
|
||||
close $file;
|
||||
$templates->{$file_name}->{contents} = $contents;
|
||||
$templates->{$file_name}->{api} = \@api;
|
||||
}
|
||||
closedir $dir;
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from all source files.
|
||||
#
|
||||
sub process_source_files {
|
||||
my ($docs) = @_;
|
||||
for my $file_path (@ARGV) {
|
||||
process_source_file($file_path, $docs);
|
||||
if ($html){
|
||||
opendir (D, "$sourcedir/sources/") || die "Can not open $dir";
|
||||
while ($n = readdir (D)){
|
||||
if ($n =~ /mono-api-.*\.html$/){
|
||||
open (IN, "$sourcedir/sources/$n") || die "Can not open $n";
|
||||
$files[$filecount] = $n;
|
||||
while (<IN>){
|
||||
@files_content[$filecount] .= $_;
|
||||
if (/name="api:(.*?)"/){
|
||||
$_ =~ s/.*name="api:(\w+?)".*/\1/;
|
||||
$apis[$filecount] .= "$_";
|
||||
}
|
||||
}
|
||||
$filecount++;
|
||||
close IN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from a single source file.
|
||||
#
|
||||
sub process_source_file {
|
||||
my ($file_path, $docs) = @_;
|
||||
open (my $file, '<', $file_path) or die "Could not open $file_path";
|
||||
while (<$file>) {
|
||||
next if (!/\/\*\* *\n/);
|
||||
process_function($file, $file_path, $docs);
|
||||
}
|
||||
close $file;
|
||||
while (<ARGV>){
|
||||
if (/\/\*\* *\n/){
|
||||
&process_doc;
|
||||
} else {
|
||||
#print "IGNORING: $_";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Extract documentation from a single function.
|
||||
#
|
||||
sub process_function {
|
||||
|
||||
my ($file, $file_path, $docs) = @_;
|
||||
|
||||
my $PARAMETER_SECTION = 0;
|
||||
my $BODY_SECTION = 1;
|
||||
my $RETURN_SECTION = 2;
|
||||
my $section = $PARAMETER_SECTION;
|
||||
|
||||
my $name = do {
|
||||
$_ = <$file>;
|
||||
chomp;
|
||||
s/^ \* //;
|
||||
s/:$//;
|
||||
$_
|
||||
};
|
||||
|
||||
# Ignore irrelevant functions, and those with the wrong doc format.
|
||||
return if $name !~ /^mono_\w+$/;
|
||||
|
||||
my $deprecated;
|
||||
my @parameters = ();
|
||||
my $body = '';
|
||||
my $returns = '';
|
||||
my $prototype = '';
|
||||
|
||||
while (<$file>) {
|
||||
|
||||
# We've reached the last line in the documentation block.
|
||||
if (/^ \*\*?\//) {
|
||||
|
||||
# Grab function prototype.
|
||||
while (<$file>) {
|
||||
$prototype .= $_;
|
||||
last if /\{/;
|
||||
}
|
||||
|
||||
# Clean up prototype.
|
||||
$prototype = do {
|
||||
$_ = $prototype;
|
||||
# Strip braces and trailing whitespace.
|
||||
s/{//;
|
||||
s/ +$//;
|
||||
# Turn "Type * xxx" into "Type* xxx"
|
||||
s/^(\w+)\W+\*/$1*/;
|
||||
$_;
|
||||
};
|
||||
|
||||
# Process formatting within sections.
|
||||
for my $parameter (@parameters) {
|
||||
process_formatting(\$parameter->{description}, $file_path, $.);
|
||||
}
|
||||
process_formatting(\$returns, $file_path, $.);
|
||||
process_formatting(\$body, $file_path, $.);
|
||||
if (defined($deprecated)) {
|
||||
process_formatting(\$deprecated, $file_path, $.);
|
||||
}
|
||||
$body =~ s/\n/ /g;
|
||||
|
||||
if (exists($docs->{body}->{$name})) {
|
||||
my $origin = $docs->{origin}->{$name};
|
||||
if ($WARNINGS) {
|
||||
warn
|
||||
"$file_path:$.: Redundant documentation for $name\n",
|
||||
"$origin->{file}:$origin->{line}: Previously defined here\n";
|
||||
}
|
||||
}
|
||||
$docs->{origin}->{$name} = { file => $file_path, line => $. };
|
||||
$docs->{body}->{$name} = $body;
|
||||
$docs->{parameters}->{$name} = \@parameters;
|
||||
$docs->{deprecated}->{$name} = $deprecated if defined $deprecated;
|
||||
$docs->{return}->{$name} = $returns;
|
||||
$docs->{prototype}->{$name} = $prototype;
|
||||
last;
|
||||
|
||||
}
|
||||
|
||||
# Strip newlines and asterisk prefix.
|
||||
chomp;
|
||||
s/^ +\*//;
|
||||
|
||||
# Replace blank lines with paragraph breaks.
|
||||
$_ = '<p>' if /^\s*$/;
|
||||
|
||||
if ($section == $PARAMETER_SECTION) {
|
||||
if (/\s*\\param +(\w+)(.*)/) {
|
||||
# print "$file_path:$.: warning: Got parameter $1\n";
|
||||
push @parameters, { name => $1, description => $2 };
|
||||
} elsif (/\s*\\deprecated(.*)/) {
|
||||
# print "$file_path:$.: warning: Got deprecated annotation\n";
|
||||
$deprecated = $1;
|
||||
} elsif (/\s*(\w+):(.*)/) {
|
||||
if ($1 eq 'deprecated') {
|
||||
warn "$file_path:$.: Old-style monodoc notation 'deprecated:' used\n"
|
||||
if $WARNINGS;
|
||||
$deprecated = $2;
|
||||
} else {
|
||||
warn "$file_path:$.: Old-style monodoc notation 'param:' used\n"
|
||||
if $WARNINGS;
|
||||
push @parameters, { name => $1, description => $2 };
|
||||
}
|
||||
} else {
|
||||
# $body = "\t$_\n";
|
||||
$section = $BODY_SECTION;
|
||||
redo;
|
||||
}
|
||||
} elsif ($section == $BODY_SECTION) {
|
||||
if (s/(Returns?:\s*|\\returns?\s*)//) {
|
||||
$returns = "\t$_\n";
|
||||
$section = $RETURN_SECTION;
|
||||
} else {
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} elsif ($section == $RETURN_SECTION) {
|
||||
$returns .= "\n\t$_";
|
||||
} else {
|
||||
die "Invalid section $section\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Substitute formatting within documentation text.
|
||||
#
|
||||
sub process_formatting {
|
||||
my ($content, $file_path, $current_line) = @_;
|
||||
$_ = $$content;
|
||||
|
||||
# Constants
|
||||
s{NULL}{<code>NULL</code>}g;
|
||||
s{TRUE}{<code>TRUE</code>}g;
|
||||
s{FALSE}{<code>FALSE</code>}g;
|
||||
|
||||
# Parameters
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '\@param' used\n"
|
||||
if s{@(\w+)}{<i>$1</i>}g && $WARNINGS;
|
||||
s{\\p +(\w+)}{<i>$1</i>}g;
|
||||
|
||||
# Code
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '#code' used\n"
|
||||
if s{#(\w+)}{<code>$1</code>}g && $WARNINGS;
|
||||
warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n"
|
||||
if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS;
|
||||
s{\\c +(\S+(?<![.,:;]))}{<code>$1</code>}g;
|
||||
|
||||
$$content = $_;
|
||||
}
|
||||
|
||||
#
|
||||
# Merge templates with stylesheet and documentation extracted from sources.
|
||||
#
|
||||
sub merge {
|
||||
my ($docs, $templates, $stylesheet) = @_;
|
||||
my $last = '';
|
||||
for my $name (keys %$templates) {
|
||||
open (my $output_file, '>', "$TARGET_DIR/html/$name")
|
||||
or die "Could not create $TARGET_DIR/html/$name";
|
||||
print "Merging: $name\n";
|
||||
print $output_file <<EOF;
|
||||
if ($html){
|
||||
for ($f = 0; $f < $filecount; $f++){
|
||||
$name = $files[$f];
|
||||
open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name";
|
||||
print "Merging: $name\n";
|
||||
print OUT<<EOF;
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>$name</title>
|
||||
<style type="text/css">
|
||||
$stylesheet
|
||||
$css
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="mapi-docs">
|
||||
EOF
|
||||
my @a = split (/\n/, $templates->{$name}->{contents});
|
||||
my $strike = '';
|
||||
my $strikeextra = '';
|
||||
my $api_shown = 0;
|
||||
for (my $ai = 0; $ai < $#a; $ai++) {
|
||||
my $line = $a[$ai];
|
||||
if (my ($api, $caption) = ($line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/)) {
|
||||
if ($api_shown == 1) {
|
||||
print $output_file "</div> <!-- class=mapi -->\n\n";
|
||||
if ($docs->{deprecated}->{$api}) {
|
||||
$strike = "mapi-strike";
|
||||
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $docs->{deprecated}->{$api};
|
||||
} else {
|
||||
$strike = "";
|
||||
$strikeextra = "";
|
||||
}
|
||||
}
|
||||
$api_shown = 1;
|
||||
my $proto = $docs->{prototype}->{$api} // $api;
|
||||
@a = split (/\n/, $files_content[$f]);
|
||||
$strikeextra = "";
|
||||
$api_shown = 0;
|
||||
for ($ai = 0; $ai < $#a; $ai++){
|
||||
$line = $a[$ai];
|
||||
|
||||
($api,$caption) = $line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
|
||||
if ($api ne ""){
|
||||
if ($api_shown == 1){
|
||||
print OUT "</div> <!-- class=mapi -->\n\n";
|
||||
if ($deprecated{$api}){
|
||||
$strike = "mapi-strike";
|
||||
$strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
|
||||
} else {
|
||||
$strike = "";
|
||||
$strikeextra = "";
|
||||
}
|
||||
}
|
||||
$api_shown = 1;
|
||||
$proto = $prototype{$api};
|
||||
if ($proto eq ""){
|
||||
$proto = "$api";
|
||||
}
|
||||
|
||||
print $output_file <<EOF;
|
||||
print OUT<<EOF;
|
||||
<a name="api:$api"></a>
|
||||
<div class="mapi">
|
||||
<div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
|
||||
@@ -302,201 +98,228 @@ EOF
|
||||
<div class="mapi-prototype">$proto</div>
|
||||
<p>
|
||||
EOF
|
||||
if (exists ($docs->{parameters}->{$api})) {
|
||||
my $ppars = $docs->{parameters}->{$api};
|
||||
if (@$ppars) {
|
||||
print $output_file
|
||||
" <div class=\"mapi-section\">Parameters</div>\n",
|
||||
" <table class=\"mapi-parameters\"><tbody>",
|
||||
render_parameters($ppars),
|
||||
"</tbody></table>";
|
||||
}
|
||||
}
|
||||
$ppars = $arguments{$api};
|
||||
if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
|
||||
print OUT " <div class=\"mapi-section\">Parameters</div>\n";
|
||||
print OUT " <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
|
||||
}
|
||||
|
||||
&opt_print ("Return value", $returns{$api}, 0);
|
||||
&opt_print ("Description", $bodies{$api}, 0);
|
||||
print OUT " </div><!--mapi-description-->\n </div><!--height container-->\n";
|
||||
} else {
|
||||
if ($line =~ /@API_IDX@/){
|
||||
$apis_toc = &create_toc ($apis[$f]);
|
||||
$line =~ s/\@API_IDX\@/$apis_toc/;
|
||||
}
|
||||
if ($line =~ /^<h4/){
|
||||
print OUT "</div>\n";
|
||||
$api_shown = 0;
|
||||
}
|
||||
if ($line =~ /`/){
|
||||
}
|
||||
print OUT "$line\n";
|
||||
}
|
||||
}
|
||||
print OUT<<EOF;
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
close OUT;
|
||||
system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
|
||||
|
||||
opt_print ($output_file, "Return value", $docs->{return}->{$api});
|
||||
opt_print ($output_file, "Description", $docs->{body}->{$api});
|
||||
print $output_file " </div><!--mapi-description-->\n </div><!--height container-->\n";
|
||||
} else {
|
||||
if ($line =~ /\@API_IDX\@/) {
|
||||
my $apis_toc = create_toc ($docs, $templates->{$name}->{api});
|
||||
$line =~ s/\@API_IDX\@/$apis_toc/;
|
||||
}
|
||||
if ($line =~ /^<h4/) {
|
||||
print $output_file "</div>\n";
|
||||
$api_shown = 0;
|
||||
}
|
||||
if ($line =~ /`/) {
|
||||
}
|
||||
print $output_file "$line\n";
|
||||
}
|
||||
}
|
||||
print $output_file
|
||||
" </div>",
|
||||
"</body>",
|
||||
"</html>";
|
||||
close $output_file;
|
||||
system ("$ENV{runtimedir}/mono-wrapper convert.exe $TARGET_DIR/html/$name $TARGET_DIR/html/x-$name");
|
||||
|
||||
# Clean up the mess that AgilityPack makes (it CDATAs our CSS).
|
||||
open (my $hack_input, '<', "$TARGET_DIR/html/x-$name")
|
||||
or die "Could not open $TARGET_DIR/html/x-$name";
|
||||
open (my $hack_output, '>', "$TARGET_DIR/deploy/$name")
|
||||
or die "Could not open output";
|
||||
# clean up the mess that AgilityPack does, it CDATAs our CSS
|
||||
open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
|
||||
open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
|
||||
|
||||
my $line = 0;
|
||||
my $doprint = 0;
|
||||
while (<$hack_input>) {
|
||||
print $hack_output $last if ($doprint);
|
||||
$line++;
|
||||
s/^\/\/<!\[CDATA\[//;
|
||||
s/^\/\/\]\]>\/\///;
|
||||
$line = 0;
|
||||
$doprint = 0;
|
||||
while (<HACK>){
|
||||
print HACKOUT $last if ($doprint);
|
||||
$line++;
|
||||
s/^\/\/<!\[CDATA\[//;
|
||||
s/^\/\/\]\]>\/\///;
|
||||
|
||||
# Remove the junk <span> wrapper generated by AgilityPack.
|
||||
if ($line==1) {
|
||||
s/<span>//;
|
||||
}
|
||||
if (/<style type/) {
|
||||
# Replace the CSS in the XHTML output with the original CSS.
|
||||
print $hack_output $_;
|
||||
print $hack_output $$stylesheet;
|
||||
while (<$hack_input>) {
|
||||
last if (/<\/style>/);
|
||||
}
|
||||
}
|
||||
$last = $_;
|
||||
$doprint = 1;
|
||||
}
|
||||
if (!($last =~ /span/)) {
|
||||
print $hack_output $last;
|
||||
}
|
||||
# system ("cp.exe $TARGET_DIR/html/$name $TARGET_DIR/deploy/$name");
|
||||
# Remove the junk <span> wrapper generated by AgilityPack
|
||||
if ($line==1){
|
||||
s/<span>//;
|
||||
}
|
||||
if (/<style type/){
|
||||
# Replace the CSS in the XHTML output with the original CSS
|
||||
print HACKOUT $_;
|
||||
print HACKOUT $css;
|
||||
while (<HACK>){
|
||||
last if (/<\/style>/);
|
||||
}
|
||||
}
|
||||
$last = $_;
|
||||
$doprint = 1;
|
||||
}
|
||||
if (!($last =~ /span/)){
|
||||
print HACKOUT $last;
|
||||
}
|
||||
|
||||
#system ("cp.exe $dir/html/$name $dir/deploy/$name");
|
||||
}
|
||||
}
|
||||
|
||||
sub process_doc {
|
||||
$doc = "";
|
||||
$func = <>;
|
||||
chop $func;
|
||||
$func =~ s/^ \* //;
|
||||
$func =~ s/:$//;
|
||||
print "Function: $func\n" if (!$html);
|
||||
$args = "";
|
||||
$inbody = 0;
|
||||
$returns = "";
|
||||
$body = "";
|
||||
$functions[$fn++] = $func;
|
||||
$deprecated = 0;
|
||||
# Process arguments
|
||||
while (<>){
|
||||
s/NULL/<code>NULL<\/code>/g;
|
||||
s/TRUE/<code>TRUE<\/code>/g;
|
||||
s/FALSE/<code>FALSE<\/code>/g;
|
||||
if (/^ \*\*?\//){
|
||||
$body =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
$returns =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
$args =~ s/@(\w+)/<i>\1<\/i>/g;
|
||||
|
||||
$body =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
$returns =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
$args =~ s/#(\w+)/<code>\1<\/code>/g;
|
||||
|
||||
$returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
$args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
$body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
|
||||
|
||||
$body =~ s/\n/ /;
|
||||
$bodies{$func} = $body;
|
||||
$arguments{$func} = $args;
|
||||
$deprecated{$func} = $deprecated;
|
||||
$returns{$func} = $returns;
|
||||
$proto = "";
|
||||
while (<>){
|
||||
$proto .= $_;
|
||||
last if (/\{/);
|
||||
}
|
||||
$proto =~ s/{//;
|
||||
# clean it up a little, remove newlines, empty space at end
|
||||
$proto =~ s/ +$//;
|
||||
# Turn "Type * xxx" into "Type* xxx"
|
||||
$proto =~ s/^(\w+)\W+\*/\1\*/;
|
||||
$prototype{$func} = $proto;
|
||||
return;
|
||||
}
|
||||
chop;
|
||||
s/^\ \*//;
|
||||
$_ = "<p>" if (/^\s*$/);
|
||||
|
||||
if ($inbody == 0){
|
||||
if (/\s*(\w+):(.*)/){
|
||||
if ($1 eq "deprecated"){
|
||||
$deprecated = $2;
|
||||
} else {
|
||||
#$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
|
||||
$args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
|
||||
}
|
||||
} else {
|
||||
|
||||
$body = "\t$_\n";
|
||||
|
||||
$inbody = 1;
|
||||
}
|
||||
} elsif ($inbody == 1) {
|
||||
if (/Returns?:/){
|
||||
s/Returns?://;
|
||||
$returns = "\t$_\n";
|
||||
$inbody = 2;
|
||||
} else {
|
||||
$body .= "\n\t$_";
|
||||
}
|
||||
} else {
|
||||
$returns .= "\n\t$_";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sub create_toc {
|
||||
my ($docs, $apis_listed) = @_;
|
||||
my ($apis_listed) = @_;
|
||||
my $type_size = 0;
|
||||
my $name_size = 0;
|
||||
my ($ret, $xname, $args);
|
||||
my $apis_toc = "";
|
||||
my $ret, $xname, $args, $line;
|
||||
$apis_toc = "";
|
||||
|
||||
# Try to align things; compute type size, method size, and arguments.
|
||||
foreach my $line (split /\n/, $apis_listed) {
|
||||
if (exists ($docs->{prototype}->{$line})) {
|
||||
my $p = $docs->{prototype}->{$line};
|
||||
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
|
||||
my $tl = length ($ret);
|
||||
my $pl = length ($xname);
|
||||
$type_size = $tl if ($tl > $type_size);
|
||||
$name_size = $pl if ($pl > $name_size);
|
||||
}
|
||||
}
|
||||
|
||||
# Try to align things, so compute type size, method size, and arguments
|
||||
foreach $line (split /\n/, $apis_listed){
|
||||
$p = $prototype{$line};
|
||||
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
|
||||
$tl = length ($ret);
|
||||
$pl = length ($xname);
|
||||
|
||||
$type_size = $tl if ($tl > $type_size);
|
||||
$name_size = $pl if ($pl > $name_size);
|
||||
}
|
||||
|
||||
$type_size++;
|
||||
$name_size++;
|
||||
|
||||
foreach my $line (split /\n/, $apis_listed) {
|
||||
chomp($line);
|
||||
if (exists($docs->{prototype}->{$line})) {
|
||||
my $p = $docs->{prototype}->{$line};
|
||||
if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
|
||||
$xname = $line if $xname eq "";
|
||||
my $rspace = " " x ($type_size - length ($ret));
|
||||
my $nspace = " " x ($name_size - length ($xname));
|
||||
$args = wrap ($args, length ($ret . $rspace . $xname . $nspace), 60);
|
||||
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
|
||||
}
|
||||
}
|
||||
foreach $line (split /\n/, $apis_listed){
|
||||
chop;
|
||||
$p = $prototype{$line};
|
||||
($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
|
||||
if ($xname eq ""){
|
||||
$xname = $line;
|
||||
}
|
||||
|
||||
$rspace = " " x ($type_size - length ($ret));
|
||||
$nspace = " " x ($name_size - length ($xname));
|
||||
$args = &format ($args, length ($ret . $rspace . $xname . $nspace), 60);
|
||||
$apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
|
||||
}
|
||||
return $apis_toc;
|
||||
}
|
||||
|
||||
sub wrap {
|
||||
#
|
||||
# Formats the rest of the arguments in a way that will fit in N columns
|
||||
#
|
||||
sub format {
|
||||
my ($args, $size, $limit) = @_;
|
||||
my $sret = "";
|
||||
|
||||
# return $args if ((length (args) + size) < $limit);
|
||||
# return $args if ((length (args) + size) < $limit);
|
||||
|
||||
my $remain = $limit - $size;
|
||||
my @sa = split /,/, $args;
|
||||
my $linelen = $size;
|
||||
foreach my $arg (@sa) {
|
||||
if ($sret eq "") {
|
||||
$sret = $arg . ", ";
|
||||
$linelen += length ($sret);
|
||||
} else {
|
||||
if ($linelen + length ($arg) < $limit) {
|
||||
$sret .= "FITS" . $arg . ", ";
|
||||
} else {
|
||||
my $newline = " " x ($size) . $arg . ", ";
|
||||
my $linelen = length ($newline);
|
||||
$sret .= "\n" . $newline;
|
||||
}
|
||||
}
|
||||
$remain = $limit - $size;
|
||||
@sa = split /,/, $args;
|
||||
$linelen = $size;
|
||||
foreach $arg (@sa){
|
||||
if ($sret eq ""){
|
||||
$sret = $arg . ", ";
|
||||
$linelen += length ($sret);
|
||||
} else {
|
||||
if ($linelen + length ($arg) < $limit){
|
||||
$sret .= "FITS" . $arg . ", ";
|
||||
} else {
|
||||
$newline = " " x ($size) . $arg . ", ";
|
||||
$linelen = length ($newline);
|
||||
$sret .= "\n" . $newline;
|
||||
}
|
||||
}
|
||||
}
|
||||
$sret =~ s/, $/;/;
|
||||
return $sret;
|
||||
}
|
||||
|
||||
#
|
||||
# Print a section if non-empty.
|
||||
#
|
||||
sub opt_print {
|
||||
my ($output, $caption, $opttext) = @_;
|
||||
if (defined($opttext) && $opttext ne '' && $opttext !~ /^[ \t]+$/) {
|
||||
print $output
|
||||
" <div class=\"mapi-section\">$caption</div>\n",
|
||||
" <div>$opttext</div>\n";
|
||||
my ($caption, $opttext, $quote) = @_;
|
||||
|
||||
if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
|
||||
print OUT " <div class=\"mapi-section\">$caption</div>\n";
|
||||
print OUT " <div>$opttext</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Render parameter information as table.
|
||||
#
|
||||
sub render_parameters {
|
||||
my ($parameters) = @_;
|
||||
my $result = '';
|
||||
for my $parameter (@$parameters) {
|
||||
$result .= "<tr><td><i>$parameter->{name}</i></td><td>$parameter->{description}</td></tr>";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
exdoc - Compiles API docs from Mono sources and HTML templates.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
exdoc [OPTIONS] [FILE...]
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print this help message.
|
||||
|
||||
=item B<--html> I<DIR>, B<-h> I<DIR>
|
||||
|
||||
Use I<DIR> as the input path for HTML sources.
|
||||
|
||||
=item B<--target> I<DIR>, B<-t> I<DIR>
|
||||
|
||||
Use I<DIR> as the target path for output.
|
||||
|
||||
=item B<--warnings>, B<-W>
|
||||
|
||||
Enable warnings about documentation errors.
|
||||
|
||||
=back
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Reads HTML templates and C sources, extracting documentation from the sources and splicing it into the templates.
|
||||
|
||||
=cut
|
||||
+1
-1
@@ -326,7 +326,7 @@ mono_poll
|
||||
mono_dynamic_stream_reset
|
||||
mono_domain_get_tls_offset
|
||||
mono_domain_add_class_static_data
|
||||
mono_handle_native_crash
|
||||
mono_handle_native_sigsegv
|
||||
mono_set_config_dir
|
||||
mono_profiler_coverage_alloc
|
||||
mono_profiler_coverage_free
|
||||
|
||||
@@ -40,8 +40,9 @@
|
||||
<p>The output of the SCC analysis is passed to the
|
||||
`cross_references()` callback. It is expected to set the
|
||||
`is_alive` flag on those strongly connected components that it
|
||||
wishes to be kept alive. The value of `is_alive` will be
|
||||
ignored on any SCCs which lack bridges.
|
||||
wishes to be kept alive. Only bridged objects will be
|
||||
reported to the callback, i.e., non-bridged objects are
|
||||
removed from the callback graph.
|
||||
|
||||
<p>In monodroid each bridged object has a corresponding Java
|
||||
mirror object. In the bridge callback it reifies the Mono
|
||||
@@ -62,7 +63,7 @@
|
||||
|
||||
<div class="mapi-header">
|
||||
enum {
|
||||
SGEN_BRIDGE_VERSION = 5
|
||||
SGEN_BRIDGE_VERSION = 4
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -27,6 +27,7 @@ typedef enum {
|
||||
|
||||
<h3>Opening and closing MonoImages</h3>
|
||||
|
||||
<h4><a name="api:mono_load_image">mono_load_image</a></h4>
|
||||
<h4><a name="api:mono_image_open">mono_image_open</a></h4>
|
||||
<h4><a name="api:mono_image_open_full">mono_image_open_full</a></h4>
|
||||
<h4><a name="api:mono_image_open_from_data">mono_image_open_from_data</a></h4>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<h4><a name="api:mono_marshal_get_delegate_invoke">mono_marshal_get_delegate_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_icall_wrapper">mono_marshal_get_icall_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_isinst">mono_marshal_get_isinst</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_ldfld_remote_wrapper">mono_marshal_get_ldfld_remote_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_ldfld_wrapper">mono_marshal_get_ldfld_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_managed_wrapper">mono_marshal_get_managed_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_native_wrapper">mono_marshal_get_native_wrapper</a></h4>
|
||||
@@ -50,6 +51,7 @@
|
||||
<h4><a name="api:mono_marshal_get_remoting_invoke_with_check">mono_marshal_get_remoting_invoke_with_check</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_runtime_invoke">mono_marshal_get_runtime_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stelemref">mono_marshal_get_stelemref</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stfld_remote_wrapper">mono_marshal_get_stfld_remote_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_stfld_wrapper">mono_marshal_get_stfld_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_struct_to_ptr">mono_marshal_get_struct_to_ptr</a></h4>
|
||||
<h4><a name="api:mono_marshal_get_synchronized_wrapper">mono_marshal_get_synchronized_wrapper</a></h4>
|
||||
@@ -57,9 +59,47 @@
|
||||
<h4><a name="api:mono_marshal_get_xappdomain_invoke">mono_marshal_get_xappdomain_invoke</a></h4>
|
||||
<h4><a name="api:mono_marshal_load_type_info">mono_marshal_load_type_info</a></h4>
|
||||
<h4><a name="api:mono_marshal_method_from_wrapper">mono_marshal_method_from_wrapper</a></h4>
|
||||
<h4><a name="api:mono_marshal_realloc">mono_marshal_realloc</a></h4>
|
||||
<h4><a name="api:mono_marshal_set_last_error">mono_marshal_set_last_error</a></h4>
|
||||
<h4><a name="api:mono_marshal_type_size">mono_marshal_type_size</a></h4>
|
||||
|
||||
<h2>Metadata Loading Errors</h2>
|
||||
|
||||
<p>The routines in this section are used to cope with errors
|
||||
during metadata loading. Errors in metadata handling can
|
||||
happen for many reason, and these include (this is not an
|
||||
exhaustive list).
|
||||
|
||||
<ul>
|
||||
<li>An assembly referenced is missing.
|
||||
<li>Fields referenced are missing.
|
||||
<li>Methods referenced are missing.
|
||||
</ul>
|
||||
|
||||
<p>The <tt>mono_loader_set_*</tt> routines are invoked during
|
||||
metadata loading to flag that an error has happened. The
|
||||
class loading errros are flagged in a per-thread basis.
|
||||
|
||||
<P>In various spots in the runtime the
|
||||
<tt>mono_loader_get_last_error</tt> routine is called to check
|
||||
if there was a problem, and then errors are propagated upwards
|
||||
on the stack until we reach a point where an exception can be
|
||||
raised and no runtime locks are held.
|
||||
|
||||
<p>The <tt>mono_loader_error_prepare_exception</tt> takes a
|
||||
<tt>MonoLoaderError</tt> structure (the value returned from
|
||||
<tt>mono_loader_get_last_error</tt>), turns that into an
|
||||
exception and clears the error condition from the current
|
||||
thread.
|
||||
|
||||
<h4><a name="api:mono_loader_set_error_field_load">mono_loader_set_error_field_load</a></h4>
|
||||
<h4><a name="api:mono_loader_set_error_method_load">mono_loader_set_error_method_load</a></h4>
|
||||
<h4><a name="api:mono_loader_set_error_type_load">mono_loader_set_error_type_load</a></h4>
|
||||
|
||||
<h4><a name="api:mono_loader_get_last_error">mono_loader_get_last_error</a></h4>
|
||||
<h4><a name="api:mono_loader_clear_error">mono_loader_clear_error</a></h4>
|
||||
<h4><a name="api:mono_loader_error_prepare_exception">mono_loader_error_prepare_exception</a></h4>
|
||||
|
||||
<h2>Metadata Loader Locking: Internals</h2>
|
||||
|
||||
<p>The locking functions here are used by code in class.c and
|
||||
@@ -74,6 +114,10 @@
|
||||
<p>The internal interface of the Mono GC is the interface used
|
||||
between the runtime engine and the garbage collector.
|
||||
|
||||
<h4><a name="api:mono_gc_disable">mono_gc_disable</a></h4>
|
||||
<h4><a name="api:mono_gc_enable">mono_gc_enable</a></h4>
|
||||
<h4><a name="api:mono_gc_start_world">mono_gc_start_world</a></h4>
|
||||
<h4><a name="api:mono_gc_stop_world">mono_gc_stop_world</a></h4>
|
||||
<h4><a name="api:mono_gc_alloc_fixed">mono_gc_alloc_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_free_fixed">mono_gc_free_fixed</a></h4>
|
||||
<h4><a name="api:mono_gc_make_descr_from_bitmap">mono_gc_make_descr_from_bitmap</a></h4>
|
||||
|
||||
@@ -31,12 +31,17 @@
|
||||
<h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_foreach_steal">mono_g_hash_table_foreach_steal</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_insert">mono_g_hash_table_insert</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_lookup">mono_g_hash_table_lookup</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_lookup_extended">mono_g_hash_table_lookup_extended</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_new">mono_g_hash_table_new</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_new_full">mono_g_hash_table_new_full</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_remap">mono_g_hash_table_remap</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_remove">mono_g_hash_table_remove</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_replace">mono_g_hash_table_replace</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_size">mono_g_hash_table_size</a></h4>
|
||||
<h4><a name="api:mono_g_hash_table_steal">mono_g_hash_table_steal</a></h4>
|
||||
|
||||
|
||||
<h3>Memory Pools</h3>
|
||||
@@ -62,6 +67,7 @@
|
||||
<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
|
||||
<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
|
||||
<h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
|
||||
<h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
|
||||
<h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
|
||||
<h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
|
||||
<h4><a name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4>
|
||||
@@ -147,4 +153,6 @@
|
||||
<h4><a name="api:mono_profiler_startup">mono_profiler_startup</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4>
|
||||
<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
|
||||
<h4><a name="api:mono_profiler_stat_hit">mono_profiler_stat_hit</a></h4>
|
||||
@@ -669,12 +669,15 @@ MONO_TYPESPEC_SIZE
|
||||
<h4><a name="api:mono_metadata_parse_method_signature">mono_metadata_parse_method_signature</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_mh">mono_metadata_parse_mh</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_param">mono_metadata_parse_param</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_ret_type">mono_metadata_parse_ret_type</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_signature">mono_metadata_parse_signature</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_typedef_or_ref">mono_metadata_parse_typedef_or_ref</a></h4>
|
||||
<h4><a name="api:mono_metadata_parse_type">mono_metadata_parse_type</a></h4>
|
||||
|
||||
<h2>Generics Support</h2>
|
||||
|
||||
<h4><a name="api:mono_metadata_generic_class_equal">mono_metadata_generic_class_equal</a></h4>
|
||||
<h4><a name="api:mono_metadata_generic_class_hash">mono_metadata_generic_class_hash</a></h4>
|
||||
<h4><a name="api:mono_metadata_generic_class_is_valuetype">mono_metadata_generic_class_is_valuetype</a></h4>
|
||||
|
||||
<h2>Tokens</h2>
|
||||
|
||||
+16
-2
@@ -1,5 +1,19 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
SUBDIRS = src
|
||||
if HOST_WIN32
|
||||
SUBDIRS = m4 src
|
||||
else
|
||||
if PLATFORM_DARWIN
|
||||
SUBDIRS = m4 src
|
||||
else
|
||||
if CROSS_COMPILING
|
||||
SUBDIRS = m4 src
|
||||
else
|
||||
SUBDIRS = m4 src test
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
EXTRA_DIST = README NEWS AUTHORS winconfig.h
|
||||
EXTRA_DIST = autogen.sh README NEWS AUTHORS winconfig.h
|
||||
@@ -1,3 +0,0 @@
|
||||
Release notes for Mono are hosted on the web, please see:
|
||||
|
||||
http://www.mono-project.com/docs/about-mono/releases/
|
||||
@@ -0,0 +1,182 @@
|
||||
dnl dolt, a replacement for libtool
|
||||
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
|
||||
dnl Copying and distribution of this file, with or without modification,
|
||||
dnl are permitted in any medium without royalty provided the copyright
|
||||
dnl notice and this notice are preserved.
|
||||
dnl
|
||||
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
|
||||
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
|
||||
dnl installed when running autoconf on your project.
|
||||
|
||||
AC_DEFUN([DOLT], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
# dolt, a replacement for libtool
|
||||
# Josh Triplett <[email protected]>
|
||||
AC_PATH_PROG(DOLT_BASH, bash)
|
||||
AC_MSG_CHECKING([if dolt supports this host])
|
||||
dolt_supported=yes
|
||||
if test x$DOLT_BASH = x; then
|
||||
dolt_supported=no
|
||||
fi
|
||||
if test x$GCC != xyes; then
|
||||
dolt_supported=no
|
||||
fi
|
||||
case $host in
|
||||
i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|
||||
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
|
||||
pic_options='-fPIC'
|
||||
;;
|
||||
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
|
||||
pic_options='-DDLL_EXPORT'
|
||||
;;
|
||||
i?86-apple-darwin*|arm-apple-darwin*)
|
||||
pic_options='-fno-common'
|
||||
;;
|
||||
*)
|
||||
dolt_supported=no
|
||||
;;
|
||||
esac
|
||||
if test x$dolt_supported = xno ; then
|
||||
AC_MSG_RESULT([no, falling back to libtool])
|
||||
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
|
||||
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
|
||||
else
|
||||
AC_MSG_RESULT([yes, replacing libtool])
|
||||
|
||||
dnl Start writing out doltcompile.
|
||||
cat <<__DOLTCOMPILE__EOF__ >doltcompile
|
||||
#!$DOLT_BASH
|
||||
__DOLTCOMPILE__EOF__
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
args=("$[]@")
|
||||
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
|
||||
if test x"${args@<:@$arg@:>@}" = x-o ; then
|
||||
objarg=$((arg+1))
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test x$objarg = x ; then
|
||||
echo 'Error: no -o on compiler command line' 1>&2
|
||||
exit 1
|
||||
fi
|
||||
lo="${args@<:@$objarg@:>@}"
|
||||
obj="${lo%.lo}"
|
||||
if test x"$lo" = x"$obj" ; then
|
||||
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
objbase="${obj##*/}"
|
||||
__DOLTCOMPILE__EOF__
|
||||
|
||||
dnl Write out shared compilation code.
|
||||
if test x$enable_shared = xyes; then
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
libobjdir="${obj%$objbase}.libs"
|
||||
if test ! -d "$libobjdir" ; then
|
||||
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
|
||||
mkdir_ret=$?
|
||||
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
|
||||
echo "$mkdir_out" 1>&2
|
||||
exit $mkdir_ret
|
||||
fi
|
||||
fi
|
||||
pic_object="$libobjdir/$objbase.o"
|
||||
args@<:@$objarg@:>@="$pic_object"
|
||||
__DOLTCOMPILE__EOF__
|
||||
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
|
||||
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
|
||||
__DOLTCOMPILE__EOF__
|
||||
fi
|
||||
|
||||
dnl Write out static compilation code.
|
||||
dnl Avoid duplicate compiler output if also building shared objects.
|
||||
if test x$enable_static = xyes; then
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
non_pic_object="$obj.o"
|
||||
args@<:@$objarg@:>@="$non_pic_object"
|
||||
__DOLTCOMPILE__EOF__
|
||||
if test x$enable_shared = xyes; then
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
|
||||
__DOLTCOMPILE__EOF__
|
||||
else
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
"${args@<:@@@:>@}" || exit $?
|
||||
__DOLTCOMPILE__EOF__
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Write out the code to write the .lo file.
|
||||
dnl The second line of the .lo file must match "^# Generated by .*libtool"
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
{
|
||||
echo "# $lo - a libtool object file"
|
||||
echo "# Generated by doltcompile, not libtool"
|
||||
__DOLTCOMPILE__EOF__
|
||||
|
||||
if test x$enable_shared = xyes; then
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
echo "pic_object='.libs/${objbase}.o'"
|
||||
__DOLTCOMPILE__EOF__
|
||||
else
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
echo pic_object=none
|
||||
__DOLTCOMPILE__EOF__
|
||||
fi
|
||||
|
||||
if test x$enable_static = xyes; then
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
echo "non_pic_object='${objbase}.o'"
|
||||
__DOLTCOMPILE__EOF__
|
||||
else
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
echo non_pic_object=none
|
||||
__DOLTCOMPILE__EOF__
|
||||
fi
|
||||
|
||||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
} > "$lo"
|
||||
__DOLTCOMPILE__EOF__
|
||||
|
||||
dnl Done writing out doltcompile; substitute it for libtool compilation.
|
||||
chmod +x doltcompile
|
||||
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
|
||||
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
|
||||
|
||||
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
|
||||
dnl a target, so write out a libtool wrapper to handle that case.
|
||||
dnl Note that doltlibtool does not handle inferred tags or option arguments
|
||||
dnl without '=', because automake does not use them.
|
||||
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
|
||||
#!$DOLT_BASH
|
||||
__DOLTLIBTOOL__EOF__
|
||||
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
|
||||
top_builddir_slash="${0%%doltlibtool}"
|
||||
: ${top_builddir_slash:=./}
|
||||
args=()
|
||||
modeok=false
|
||||
tagok=false
|
||||
for arg in "$[]@"; do
|
||||
case "$arg" in
|
||||
--silent) ;;
|
||||
--mode=compile) modeok=true ;;
|
||||
--tag=CC|--tag=CXX) tagok=true ;;
|
||||
--quiet) ;;
|
||||
*) args@<:@${#args[@]}@:>@="$arg" ;;
|
||||
esac
|
||||
done
|
||||
if $modeok && $tagok ; then
|
||||
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
|
||||
else
|
||||
exec ${top_builddir_slash}libtool "$[]@"
|
||||
fi
|
||||
__DOLTLIBTOOL__EOF__
|
||||
|
||||
dnl Done writing out doltlibtool; substitute it for libtool.
|
||||
chmod +x doltlibtool
|
||||
LIBTOOL='$(top_builddir)/doltlibtool'
|
||||
fi
|
||||
AC_SUBST(LTCOMPILE)
|
||||
AC_SUBST(LTCXXCOMPILE)
|
||||
# end dolt
|
||||
])
|
||||
Executable
+136
@@ -0,0 +1,136 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
# Ripped off from GNOME macros version
|
||||
|
||||
DIE=0
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
if [ -n "$MONO_PATH" ]; then
|
||||
# from -> /mono/lib:/another/mono/lib
|
||||
# to -> /mono /another/mono
|
||||
for i in `echo ${MONO_PATH} | tr ":" " "`; do
|
||||
i=`dirname ${i}`
|
||||
if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
|
||||
ACLOCAL_FLAGS="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
|
||||
fi
|
||||
if [ -n "{i}" -a -d "${i}/bin" ]; then
|
||||
PATH="${i}/bin:$PATH"
|
||||
fi
|
||||
done
|
||||
export PATH
|
||||
fi
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to compile Mono."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if [ -z "$LIBTOOLIZE" ]; then
|
||||
LIBTOOLIZE=`which glibtoolize 2>/dev/null`
|
||||
if [ ! -x "$LIBTOOLIZE" ]; then
|
||||
LIBTOOLIZE=`which libtoolize`
|
||||
fi
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
|
||||
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtoolize' installed to compile Mono."
|
||||
echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed to compile Mono."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed to compile Mono."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test x$NOCONFIGURE = x && test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
$LIBTOOLIZE --force --copy
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Running aclocal -I m4 $ACLOCAL_FLAGS ..."
|
||||
aclocal -I m4 $ACLOCAL_FLAGS || {
|
||||
echo
|
||||
echo "**Error**: aclocal failed. This may mean that you have not"
|
||||
echo "installed all of the packages you need, or you may need to"
|
||||
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
|
||||
echo "for the prefix where you installed the packages whose"
|
||||
echo "macros were not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
|
||||
fi
|
||||
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --gnu $am_opt ||
|
||||
{ echo "**Error**: automake failed."; exit 1; }
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
|
||||
conf_flags="--enable-maintainer-mode" #--enable-compile-warnings --enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
Executable
+672
@@ -0,0 +1,672 @@
|
||||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2010 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <[email protected]>, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||
|
||||
for cc_temp in $CC""; do
|
||||
case $cc_temp in
|
||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||
\-*) ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
case $cc_basename in
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
icc* | ifort*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# Set some defaults for GNU ld with shared library support. These
|
||||
# are reset later if shared libraries are not supported. Putting them
|
||||
# here allows them to be overridden if necessary.
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
case "$host_os" in
|
||||
aix[3-9]*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <[email protected]> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
interix[3-9]*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
gnu* | linux* | k*bsd*-gnu)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
||||
case `$LD -v 2>&1` in
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = no; then
|
||||
hardcode_libdir_flag_spec=
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix[4-9]*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
:
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
fi
|
||||
;;
|
||||
hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
*)
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6*)
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||
hardcode_libdir_separator=':'
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
||||
# only about the one the linker finds when passed -lNAME. This is the last
|
||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
||||
# linker has special search rules.
|
||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
aix[4-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
amigaos*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
beos*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
bsdi[45]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.dll.a $libname.lib'
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
dgux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
case "$host_os" in
|
||||
freebsd[123]*)
|
||||
library_names_spec='$libname$shrext$versuffix' ;;
|
||||
*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
esac
|
||||
;;
|
||||
gnu*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
interix[3-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
netbsd*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
newsos6)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
nto-qnx*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
openbsd*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sunos4*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
sysv4 | sysv4.3*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
uts4*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Format of library name prefix.
|
||||
libname_spec="$escaped_libname_spec"
|
||||
|
||||
# Library names that the linker finds when passed -lNAME.
|
||||
library_names_spec="$escaped_library_names_spec"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
||||
@@ -0,0 +1,252 @@
|
||||
#
|
||||
# Copyright 2012 Xamarin Inc
|
||||
#
|
||||
AC_INIT(eglib, [0.3],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_LIBTOOL
|
||||
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
|
||||
DOLT
|
||||
GNUC_PRETTY=
|
||||
GNUC_UNUSED=
|
||||
BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
|
||||
if test x$GCC = xyes; then
|
||||
GNUC_UNUSED='__attribute__((__unused__))'
|
||||
GNUC_NORETURN='__attribute__((__noreturn__))'
|
||||
case $host_cpu in
|
||||
i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(GNUC_PRETTY)
|
||||
AC_SUBST(GNUC_UNUSED)
|
||||
AC_SUBST(GNUC_NORETURN)
|
||||
AC_SUBST(BREAKPOINT)
|
||||
|
||||
# We use a separate variable to pass down CPPFLAGS and CFLAGS from the main mono
|
||||
# configure, because of autoconf brokeness
|
||||
if test "x$CPPFLAGS_FOR_EGLIB" != "x"; then
|
||||
CPPFLAGS=$CPPFLAGS_FOR_EGLIB
|
||||
fi
|
||||
if test "x$CFLAGS_FOR_EGLIB" != "x"; then
|
||||
CFLAGS=$CFLAGS_FOR_EGLIB
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -g -D_GNU_SOURCE"
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
|
||||
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
|
||||
|
||||
platform_darwin=no
|
||||
platform_android=no
|
||||
|
||||
case $host in
|
||||
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
|
||||
PATHSEP='\\'
|
||||
SEARCHSEP=';'
|
||||
OS="WIN32"
|
||||
PIDTYPE='void *'
|
||||
;;
|
||||
*-*darwin*)
|
||||
platform_darwin=yes
|
||||
PATHSEP='/'
|
||||
SEARCHSEP=':'
|
||||
OS="UNIX"
|
||||
PIDTYPE='int'
|
||||
;;
|
||||
*-*-linux-android*)
|
||||
platform_android=yes
|
||||
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
|
||||
PATHSEP='/'
|
||||
SEARCHSEP=':'
|
||||
OS="UNIX"
|
||||
PIDTYPE='int'
|
||||
;;
|
||||
*)
|
||||
PATHSEP='/'
|
||||
SEARCHSEP=':'
|
||||
OS="UNIX"
|
||||
PIDTYPE='int'
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host in
|
||||
*-*-solaris*)
|
||||
CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
||||
;;
|
||||
esac
|
||||
|
||||
case $target in
|
||||
arm*-darwin*|aarch64*-*)
|
||||
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE"
|
||||
;;
|
||||
i*86-*-darwin*)
|
||||
ORDER=G_LITTLE_ENDIAN
|
||||
;;
|
||||
*-*-openbsd*)
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
;;
|
||||
esac
|
||||
|
||||
target_osx=no
|
||||
target_ios=no
|
||||
|
||||
if test "x$platform_darwin" = "xyes"; then
|
||||
AC_TRY_COMPILE([#include "TargetConditionals.h"],[
|
||||
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||
#error fail this for ios
|
||||
#endif
|
||||
return 0;
|
||||
], [
|
||||
AC_DEFINE(TARGET_OSX,1,[The JIT/AOT targets OSX])
|
||||
target_osx=yes
|
||||
], [
|
||||
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
|
||||
target_ios=yes
|
||||
])
|
||||
AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms])
|
||||
fi
|
||||
|
||||
AC_SUBST(ORDER)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(PATHSEP)
|
||||
AC_SUBST(SEARCHSEP)
|
||||
AC_SUBST(OS)
|
||||
AC_SUBST(PIDTYPE)
|
||||
AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
|
||||
AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
|
||||
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
|
||||
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
|
||||
#
|
||||
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
|
||||
# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
|
||||
# removed once support for 10.6 is dropped.
|
||||
#
|
||||
# iOS detection of strndup and getpwuid_r is faulty for some reason so let's simply avoid it
|
||||
#
|
||||
if test x$target_osx = xyes; then
|
||||
AC_CHECK_FUNCS(getpwuid_r)
|
||||
elif test x$target_ios = xno; then
|
||||
AC_CHECK_FUNCS(strndup getpwuid_r)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
|
||||
AM_ICONV()
|
||||
AC_SEARCH_LIBS(sqrtf, m)
|
||||
|
||||
# nanosleep may not be part of libc, also search it in other libraries
|
||||
AC_SEARCH_LIBS(nanosleep, rt)
|
||||
|
||||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
old_ldflags="${LDFLAGS}"
|
||||
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
|
||||
AC_TRY_LINK(, [int i;], found_export_dynamic=yes, found_export_dynamic=no)
|
||||
if test $found_export_dynamic = no; then
|
||||
LDFLAGS="${old_ldflags}"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for varargs macros)
|
||||
AC_TRY_COMPILE([],[
|
||||
int foo (int i, int j);
|
||||
#define bar(...) foo (1, __VA_ARGS__)
|
||||
void main () {
|
||||
bar (2);
|
||||
}
|
||||
],have_iso_varargs=yes,have_iso_varargs=no)
|
||||
AC_MSG_RESULT($have_iso_varargs)
|
||||
G_HAVE_ISO_VARARGS=0
|
||||
if test "x$have_iso_varargs" = "xyes"; then
|
||||
G_HAVE_ISO_VARARGS=1
|
||||
fi
|
||||
AC_SUBST(G_HAVE_ISO_VARARGS)
|
||||
|
||||
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h sys/types.h sys/resource.h)
|
||||
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])])
|
||||
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
|
||||
AC_SUBST(HAVE_ALLOCA_H)
|
||||
|
||||
if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
|
||||
GPOINTER_TO_INT="((gint) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint) (ptr))"
|
||||
GINT_TO_POINTER="((gpointer) (v))"
|
||||
GUINT_TO_POINTER="((gpointer) (v))"
|
||||
GSIZE="int"
|
||||
GSIZE_FORMAT='"u"'
|
||||
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
|
||||
GPOINTER_TO_INT="((gint)(long) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint)(long) (ptr))"
|
||||
GINT_TO_POINTER="((gpointer)(glong) (v))"
|
||||
GUINT_TO_POINTER="((gpointer)(gulong) (v))"
|
||||
GSIZE="long"
|
||||
GSIZE_FORMAT='"lu"'
|
||||
elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
|
||||
GPOINTER_TO_INT="((gint)(long long) (ptr))"
|
||||
GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
|
||||
GINT_TO_POINTER="((gpointer)(long long) (v))"
|
||||
GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
|
||||
GSIZE="long long"
|
||||
GSIZE_FORMAT='"I64u"'
|
||||
else
|
||||
AC_MSG_ERROR([unsupported pointer size])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
||||
pkg_config_path=
|
||||
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir],
|
||||
if test x$with_crosspkgdir = "x"; then
|
||||
if test -s $PKG_CONFIG_PATH; then
|
||||
pkg_config_path=$PKG_CONFIG_PATH
|
||||
fi
|
||||
else
|
||||
pkg_config_path=$with_crosspkgdir
|
||||
PKG_CONFIG_PATH=$pkg_config_path
|
||||
export PKG_CONFIG_PATH
|
||||
fi
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no)
|
||||
if test x$werror_flag = xyes; then
|
||||
WERROR_CFLAGS="-Werror"
|
||||
fi
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
|
||||
AC_SUBST(GPOINTER_TO_INT)
|
||||
AC_SUBST(GPOINTER_TO_UINT)
|
||||
AC_SUBST(GINT_TO_POINTER)
|
||||
AC_SUBST(GUINT_TO_POINTER)
|
||||
AC_SUBST(GSIZE)
|
||||
AC_SUBST(GSIZE_FORMAT)
|
||||
AC_SUBST(G_GUINT64_FORMAT)
|
||||
AC_SUBST(G_GINT64_FORMAT)
|
||||
AC_SUBST(G_GUINT32_FORMAT)
|
||||
AC_SUBST(G_GINT32_FORMAT)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
m4/Makefile
|
||||
src/Makefile
|
||||
src/eglib-config.h
|
||||
test/Makefile
|
||||
])
|
||||
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
@@ -0,0 +1 @@
|
||||
EXTRA_DIST = $(wildcard *.m4)
|
||||
@@ -0,0 +1,214 @@
|
||||
# iconv.m4 serial 11 (gettext-0.18.1)
|
||||
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
||||
[
|
||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
||||
])
|
||||
|
||||
AC_DEFUN([AM_ICONV_LINK],
|
||||
[
|
||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||
dnl those with the standalone portable GNU libiconv installed).
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
||||
dnl accordingly.
|
||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
||||
|
||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed libiconv and not disabled its use
|
||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
||||
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
||||
am_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
||||
|
||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||
am_cv_lib_iconv=no
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_func_iconv=yes])
|
||||
if test "$am_cv_func_iconv" != yes; then
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_TRY_LINK([#include <stdlib.h>
|
||||
#include <iconv.h>],
|
||||
[iconv_t cd = iconv_open("","");
|
||||
iconv(cd,NULL,NULL,NULL,NULL);
|
||||
iconv_close(cd);],
|
||||
[am_cv_lib_iconv=yes]
|
||||
[am_cv_func_iconv=yes])
|
||||
LIBS="$am_save_LIBS"
|
||||
fi
|
||||
])
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
||||
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
|
||||
am_save_LIBS="$LIBS"
|
||||
if test $am_cv_lib_iconv = yes; then
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
fi
|
||||
AC_TRY_RUN([
|
||||
#include <iconv.h>
|
||||
#include <string.h>
|
||||
int main ()
|
||||
{
|
||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
||||
returns. */
|
||||
{
|
||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\342\202\254"; /* EURO SIGN */
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_utf8_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
||||
successful returns. */
|
||||
{
|
||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\263";
|
||||
char buf[10];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_ascii_to_88591,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if (res == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#if 0 /* This bug could be worked around by the caller. */
|
||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
||||
{
|
||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
||||
{
|
||||
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
||||
char buf[50];
|
||||
const char *inptr = input;
|
||||
size_t inbytesleft = strlen (input);
|
||||
char *outptr = buf;
|
||||
size_t outbytesleft = sizeof (buf);
|
||||
size_t res = iconv (cd_88591_to_utf8,
|
||||
(char **) &inptr, &inbytesleft,
|
||||
&outptr, &outbytesleft);
|
||||
if ((int)res > 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
||||
provided. */
|
||||
if (/* Try standardized names. */
|
||||
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
||||
/* Try IRIX, OSF/1 names. */
|
||||
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
||||
/* Try AIX names. */
|
||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
||||
/* Try HP-UX names. */
|
||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
||||
return 1;
|
||||
return 0;
|
||||
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
|
||||
[case "$host_os" in
|
||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
||||
esac])
|
||||
LIBS="$am_save_LIBS"
|
||||
])
|
||||
case "$am_cv_func_iconv_works" in
|
||||
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
||||
*) am_func_iconv=yes ;;
|
||||
esac
|
||||
else
|
||||
am_func_iconv=no am_cv_lib_iconv=no
|
||||
fi
|
||||
if test "$am_func_iconv" = yes; then
|
||||
AC_DEFINE([HAVE_ICONV], [1],
|
||||
[Define if you have the iconv() function and it works.])
|
||||
fi
|
||||
if test "$am_cv_lib_iconv" = yes; then
|
||||
AC_MSG_CHECKING([how to link with libiconv])
|
||||
AC_MSG_RESULT([$LIBICONV])
|
||||
else
|
||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
||||
dnl either.
|
||||
CPPFLAGS="$am_save_CPPFLAGS"
|
||||
LIBICONV=
|
||||
LTLIBICONV=
|
||||
fi
|
||||
AC_SUBST([LIBICONV])
|
||||
AC_SUBST([LTLIBICONV])
|
||||
])
|
||||
|
||||
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
|
||||
dnl avoid warnings like
|
||||
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
|
||||
dnl This is tricky because of the way 'aclocal' is implemented:
|
||||
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
|
||||
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
|
||||
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
|
||||
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
||||
dnl warnings.
|
||||
m4_define([gl_iconv_AC_DEFUN],
|
||||
m4_version_prereq([2.64],
|
||||
[[AC_DEFUN_ONCE(
|
||||
[$1], [$2])]],
|
||||
[[AC_DEFUN(
|
||||
[$1], [$2])]]))
|
||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
||||
[
|
||||
AM_ICONV_LINK
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
AC_MSG_CHECKING([for iconv declaration])
|
||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||
#else
|
||||
size_t iconv();
|
||||
#endif
|
||||
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
|
||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||
AC_MSG_RESULT([
|
||||
$am_cv_proto_iconv])
|
||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
||||
[Define as const if the declaration of iconv() needs const.])
|
||||
fi
|
||||
])
|
||||
@@ -0,0 +1,110 @@
|
||||
# lib-ld.m4 serial 4 (gettext-0.18)
|
||||
dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH([gnu-ld],
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL([acl_cv_path_LD],
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT([$LD])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
@@ -0,0 +1,774 @@
|
||||
# lib-link.m4 serial 21 (gettext-0.18)
|
||||
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ([2.54])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[translit([$1],[./-], [___])])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. The missing-message
|
||||
dnl defaults to 'no' and may contain additional hints for the user.
|
||||
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
||||
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
pushdef([Name],[translit([$1],[./-], [___])])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
|
||||
dnl because these -l options might require -L options that are present in
|
||||
dnl LIBS. -l options benefit only from the -L options listed before it.
|
||||
dnl Otherwise, add it to the front of LIBS, because it may be a static
|
||||
dnl library that depends on another static library that is present in LIBS.
|
||||
dnl Static libraries benefit only from the static libraries listed after
|
||||
dnl it.
|
||||
case " $LIB[]NAME" in
|
||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
||||
esac
|
||||
AC_TRY_LINK([$3], [$4],
|
||||
[ac_cv_lib[]Name=yes],
|
||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
AC_SUBST([LIB]NAME[_PREFIX])
|
||||
popdef([NAME])
|
||||
popdef([Name])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl acl_libext,
|
||||
dnl acl_shlibext,
|
||||
dnl acl_hardcode_libdir_flag_spec,
|
||||
dnl acl_hardcode_libdir_separator,
|
||||
dnl acl_hardcode_direct,
|
||||
dnl acl_hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
acl_libext="$acl_cv_libext"
|
||||
acl_shlibext="$acl_cv_shlibext"
|
||||
acl_libname_spec="$acl_cv_libname_spec"
|
||||
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_FROMPACKAGE(name, package)
|
||||
dnl declares that libname comes from the given package. The configure file
|
||||
dnl will then not have a --with-libname-prefix option but a
|
||||
dnl --with-package-prefix option. Several libraries can come from the same
|
||||
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
||||
dnl macro call that searches for libname.
|
||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
||||
[
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
define([acl_frompackage_]NAME, [$2])
|
||||
popdef([NAME])
|
||||
pushdef([PACK],[$2])
|
||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
define([acl_libsinpackage_]PACKUP,
|
||||
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
||||
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
||||
pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
||||
dnl Autoconf >= 2.61 supports dots in --with options.
|
||||
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_ARG_WITH(P_A_C_K[-prefix],
|
||||
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
||||
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||
&& ! test -d "$withval/$acl_libdirstem"; then
|
||||
additional_libdir="$withval/$acl_libdirstem2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
LIB[]NAME[]_PREFIX=
|
||||
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
||||
dnl computed. So it has to be reset here.
|
||||
HAVE_LIB[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||
if test -n "$acl_shlibext"; then
|
||||
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||
else
|
||||
shrext=
|
||||
fi
|
||||
if test $use_additional = yes; then
|
||||
dir="$additional_libdir"
|
||||
dnl The same code as in the loop below:
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
dnl First look for a shared library.
|
||||
if test -n "$acl_shlibext"; then
|
||||
if test -f "$dir/$libname$shrext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext"
|
||||
else
|
||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||
ver=`(cd "$dir" && \
|
||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||
| sed 1q ) 2>/dev/null`
|
||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$libname$shrext.$ver"
|
||||
fi
|
||||
else
|
||||
eval library_names=\"$acl_library_names_spec\"
|
||||
for f in $library_names; do
|
||||
if test -f "$dir/$f"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/$f"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Then look for a static library.
|
||||
if test "X$found_dir" = "X"; then
|
||||
if test -f "$dir/$libname.$acl_libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/$libname.$acl_libext"
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
if test -f "$dir/$libname.la"; then
|
||||
found_la="$dir/$libname.la"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$acl_hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$acl_hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||
if test "$name" = '$1'; then
|
||||
LIB[]NAME[]_PREFIX="$basedir"
|
||||
fi
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
popdef([P_A_C_K])
|
||||
popdef([PACKLIBS])
|
||||
popdef([PACKUP])
|
||||
popdef([PACK])
|
||||
popdef([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl For those cases where a variable contains several -L and -l options
|
||||
dnl referring to unknown libraries and directories, this macro determines the
|
||||
dnl necessary additional linker options for the runtime path.
|
||||
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
||||
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
||||
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
||||
dnl otherwise linking without libtool is assumed.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
$1=
|
||||
if test "$enable_rpath" != no; then
|
||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode directories into the resulting
|
||||
dnl binary.
|
||||
rpathdirs=
|
||||
next=
|
||||
for opt in $2; do
|
||||
if test -n "$next"; then
|
||||
dir="$next"
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next=
|
||||
else
|
||||
case $opt in
|
||||
-L) next=yes ;;
|
||||
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
||||
dnl No need to hardcode the standard /usr/lib.
|
||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
next= ;;
|
||||
*) next= ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n ""$3""; then
|
||||
dnl libtool is used for linking. Use -R options.
|
||||
for dir in $rpathdirs; do
|
||||
$1="${$1}${$1:+ }-R$dir"
|
||||
done
|
||||
else
|
||||
dnl The linker is used for linking directly.
|
||||
if test -n "$acl_hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user
|
||||
dnl must pass all path elements in one option.
|
||||
alldirs=
|
||||
for dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
||||
done
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$dir"
|
||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
$1="${$1}${$1:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([$1])
|
||||
])
|
||||
@@ -0,0 +1,224 @@
|
||||
# lib-prefix.m4 serial 7 (gettext-0.18)
|
||||
dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/$acl_libdirstem"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_MULTILIB creates
|
||||
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
||||
dnl "lib" or "lib64" or "lib/64",
|
||||
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
||||
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
||||
dnl "lib/amd64".
|
||||
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
||||
[
|
||||
dnl There is no formal standard regarding lib and lib64.
|
||||
dnl On glibc systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
||||
dnl the compiler's default mode by looking at the compiler's library search
|
||||
dnl path. If at least one of its elements ends in /lib64 or points to a
|
||||
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
||||
dnl Otherwise we use the default, namely "lib".
|
||||
dnl On Solaris systems, the current practice is that on a system supporting
|
||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
||||
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
||||
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
acl_libdirstem=lib
|
||||
acl_libdirstem2=
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
||||
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
|
||||
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
||||
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
||||
dnl symlink is missing, so we set acl_libdirstem2 too.
|
||||
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
||||
[AC_EGREP_CPP([sixtyfour bits], [
|
||||
#ifdef _LP64
|
||||
sixtyfour bits
|
||||
#endif
|
||||
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
|
||||
])
|
||||
if test $gl_cv_solaris_64bit = yes; then
|
||||
acl_libdirstem=lib/64
|
||||
case "$host_cpu" in
|
||||
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
||||
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
||||
if test -n "$searchpath"; then
|
||||
acl_save_IFS="${IFS= }"; IFS=":"
|
||||
for searchdir in $searchpath; do
|
||||
if test -d "$searchdir"; then
|
||||
case "$searchdir" in
|
||||
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
||||
*/../ | */.. )
|
||||
# Better ignore directories of this form. They are misleading.
|
||||
;;
|
||||
*) searchdir=`cd "$searchdir" && pwd`
|
||||
case "$searchdir" in
|
||||
*/lib64 ) acl_libdirstem=lib64 ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$acl_save_IFS"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
||||
])
|
||||
+13
-3
@@ -5,12 +5,20 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
win_files = \
|
||||
eglib-config.hw \
|
||||
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
|
||||
gmodule-win32.c gmodule-win32-internals.h gtimer-win32.c gunicode-win32.c
|
||||
gmodule-win32.c gtimer-win32.c
|
||||
|
||||
unix_files = \
|
||||
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
|
||||
gmodule-unix.c gtimer-unix.c
|
||||
|
||||
# some unices and windows do not have an implementation of vasprintf
|
||||
# used by eglib, use provided implementation instead
|
||||
if NEED_VASPRINTF
|
||||
vasprintf_files = vasprintf.c
|
||||
else
|
||||
vaprinttf_files = foo.c
|
||||
endif
|
||||
|
||||
if HOST_WIN32
|
||||
os_files = $(win_files)
|
||||
else
|
||||
@@ -24,6 +32,7 @@ libeglib_la_SOURCES = \
|
||||
garray.c \
|
||||
gbytearray.c \
|
||||
gerror.c \
|
||||
vasprintf.h \
|
||||
ghashtable.c \
|
||||
giconv.c \
|
||||
gmem.c \
|
||||
@@ -46,9 +55,10 @@ libeglib_la_SOURCES = \
|
||||
gutf8.c \
|
||||
gunicode.c \
|
||||
unicode-data.h \
|
||||
$(os_files)
|
||||
$(os_files) \
|
||||
$(vasprintf_files)
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef signed @GSIZE@ gssize;
|
||||
#define G_HAVE_ISO_VARARGS
|
||||
#endif
|
||||
|
||||
#if defined (HOST_WATCHOS)
|
||||
#if defined (__native_client__) || defined (HOST_WATCHOS)
|
||||
#undef G_BREAKPOINT
|
||||
#define G_BREAKPOINT()
|
||||
#endif
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#define g_byte_array_append monoeg_g_byte_array_append
|
||||
#define g_byte_array_free monoeg_g_byte_array_free
|
||||
#define g_byte_array_new monoeg_g_byte_array_new
|
||||
#define g_byte_array_set_size monoeg_g_byte_array_set_size
|
||||
#define g_calloc monoeg_g_calloc
|
||||
#define g_clear_error monoeg_g_clear_error
|
||||
#define g_convert monoeg_g_convert
|
||||
#define g_convert_error_quark monoeg_g_convert_error_quark
|
||||
@@ -27,7 +25,6 @@
|
||||
#define g_mkdir_with_parents monoeg_g_mkdir_with_parents
|
||||
#define g_direct_equal monoeg_g_direct_equal
|
||||
#define g_direct_hash monoeg_g_direct_hash
|
||||
#define g_ensure_directory_exists monoeg_g_ensure_directory_exists
|
||||
#define g_error_free monoeg_g_error_free
|
||||
#define g_error_new monoeg_g_error_new
|
||||
#define g_error_vnew monoeg_g_error_vnew
|
||||
@@ -51,7 +48,6 @@
|
||||
#define g_get_tmp_dir monoeg_g_get_tmp_dir
|
||||
#define g_get_user_name monoeg_g_get_user_name
|
||||
#define g_getenv monoeg_g_getenv
|
||||
#define g_hasenv monoeg_g_hasenv
|
||||
#define g_hash_table_destroy monoeg_g_hash_table_destroy
|
||||
#define g_hash_table_find monoeg_g_hash_table_find
|
||||
#define g_hash_table_foreach monoeg_g_hash_table_foreach
|
||||
@@ -111,8 +107,6 @@
|
||||
#define g_markup_parse_context_new monoeg_g_markup_parse_context_new
|
||||
#define g_markup_parse_context_parse monoeg_g_markup_parse_context_parse
|
||||
#define g_memdup monoeg_g_memdup
|
||||
#define g_mem_set_vtable monoeg_g_mem_set_vtable
|
||||
#define g_mkdtemp monoeg_g_mkdtemp
|
||||
#define g_module_build_path monoeg_g_module_build_path
|
||||
#define g_module_close monoeg_g_module_close
|
||||
#define g_module_error monoeg_g_module_error
|
||||
@@ -257,7 +251,6 @@
|
||||
#define g_utf8_offset_to_pointer monoeg_g_utf8_offset_to_pointer
|
||||
#define g_utf8_pointer_to_offset monoeg_g_utf8_pointer_to_offset
|
||||
#define g_utf8_to_ucs4_fast monoeg_g_utf8_to_ucs4_fast
|
||||
#define g_vasprintf monoeg_g_vasprintf
|
||||
#define g_win32_getlocale monoeg_g_win32_getlocale
|
||||
#define g_assertion_message monoeg_assertion_message
|
||||
#define g_malloc monoeg_malloc
|
||||
|
||||
+6
-4
@@ -28,8 +28,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
GError *
|
||||
g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
{
|
||||
@@ -40,7 +42,7 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
err->code = code;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&err->message, format, args) == -1)
|
||||
if (vasprintf (&err->message, format, args) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
va_end (args);
|
||||
|
||||
@@ -55,7 +57,7 @@ g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
|
||||
err->domain = domain;
|
||||
err->code = code;
|
||||
|
||||
if (g_vasprintf (&err->message, format, ap) == -1)
|
||||
if (vasprintf (&err->message, format, ap) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
|
||||
return err;
|
||||
@@ -75,7 +77,7 @@ g_error_free (GError *error)
|
||||
{
|
||||
g_return_if_fail (error != NULL);
|
||||
|
||||
g_free (error->message);
|
||||
free (error->message);
|
||||
g_free (error);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,15 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
|
||||
gchar *
|
||||
g_get_current_dir (void)
|
||||
{
|
||||
#ifdef __native_client__
|
||||
char *buffer;
|
||||
if ((buffer = g_getenv("NACL_PWD"))) {
|
||||
buffer = g_strdup(buffer);
|
||||
} else {
|
||||
buffer = g_strdup(".");
|
||||
}
|
||||
return buffer;
|
||||
#else
|
||||
int s = 32;
|
||||
char *buffer = NULL, *r;
|
||||
gboolean fail;
|
||||
@@ -172,4 +181,5 @@ g_get_current_dir (void)
|
||||
* so we return the buffer here since it has a pointer to the valid string
|
||||
*/
|
||||
return buffer;
|
||||
#endif
|
||||
}
|
||||
@@ -78,15 +78,3 @@ g_file_test (const gchar *filename, GFileTest test)
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
#ifdef HAVE_MKDTEMP
|
||||
char *template_copy = g_strdup (tmp_template);
|
||||
|
||||
return mkdtemp (template_copy);
|
||||
#else
|
||||
g_error("Function not supported");
|
||||
#endif
|
||||
}
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <direct.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
@@ -69,26 +68,6 @@ int mkstemp (char *tmp_template)
|
||||
return fd;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
gunichar2* utf16_template;
|
||||
|
||||
utf16_template = u8to16 (tmp_template);
|
||||
|
||||
utf16_template = _wmktemp(utf16_template);
|
||||
if (utf16_template && *utf16_template) {
|
||||
if (_wmkdir (utf16_template) == 0){
|
||||
char *ret = u16to8 (utf16_template);
|
||||
g_free (utf16_template);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (utf16_template);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4701)
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -199,11 +199,8 @@ g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft,
|
||||
} else {
|
||||
outleftptr = NULL;
|
||||
}
|
||||
#if defined(__NetBSD__)
|
||||
return iconv (cd->cd, (const gchar **)inbytes, inleftptr, outbytes, outleftptr);
|
||||
#else
|
||||
|
||||
return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+7
-14
@@ -1,5 +1,6 @@
|
||||
#ifndef __GLIB_H
|
||||
#define __GLIB_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -8,13 +9,11 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <eglib-config.h>
|
||||
#ifndef EGLIB_NO_REMAP
|
||||
@@ -127,7 +126,6 @@ void g_free (void *ptr);
|
||||
gpointer g_realloc (gpointer obj, gsize size);
|
||||
gpointer g_malloc (gsize x);
|
||||
gpointer g_malloc0 (gsize x);
|
||||
gpointer g_calloc (gsize n, gsize x);
|
||||
gpointer g_try_malloc (gsize x);
|
||||
gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
|
||||
@@ -140,7 +138,7 @@ gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
#define g_alloca(size) alloca (size)
|
||||
|
||||
gpointer g_memdup (gconstpointer mem, guint byte_size);
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) { return (gchar*) g_memdup (str, (guint)strlen (str) + 1); } return NULL; }
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; }
|
||||
gchar **g_strdupv (gchar **str_array);
|
||||
|
||||
typedef struct {
|
||||
@@ -148,9 +146,11 @@ typedef struct {
|
||||
gpointer (*realloc) (gpointer mem, gsize n_bytes);
|
||||
void (*free) (gpointer mem);
|
||||
gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes);
|
||||
gpointer (*try_malloc) (gsize n_bytes);
|
||||
gpointer (*try_realloc) (gpointer mem, gsize n_bytes);
|
||||
} GMemVTable;
|
||||
|
||||
void g_mem_set_vtable (GMemVTable* vtable);
|
||||
#define g_mem_set_vtable(x)
|
||||
|
||||
struct _GMemChunk {
|
||||
guint alloc_size;
|
||||
@@ -161,8 +161,7 @@ typedef struct _GMemChunk GMemChunk;
|
||||
* Misc.
|
||||
*/
|
||||
|
||||
gboolean g_hasenv(const gchar *variable);
|
||||
gchar * g_getenv(const gchar *variable);
|
||||
const gchar * g_getenv(const gchar *variable);
|
||||
gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite);
|
||||
void g_unsetenv(const gchar *variable);
|
||||
|
||||
@@ -224,11 +223,11 @@ gint g_printf (gchar const *format, ...);
|
||||
gint g_fprintf (FILE *file, gchar const *format, ...);
|
||||
gint g_sprintf (gchar *string, gchar const *format, ...);
|
||||
gint g_snprintf (gchar *string, gulong n, gchar const *format, ...);
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap);
|
||||
#define g_vprintf vprintf
|
||||
#define g_vfprintf vfprintf
|
||||
#define g_vsprintf vsprintf
|
||||
#define g_vsnprintf vsnprintf
|
||||
#define g_vasprintf vasprintf
|
||||
|
||||
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
|
||||
gchar *g_stpcpy (gchar *dest, const char *src);
|
||||
@@ -889,8 +888,6 @@ gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
#define g_ascii_strtod strtod
|
||||
#define g_ascii_isalnum isalnum
|
||||
|
||||
gchar *g_mkdtemp (gchar *tmpl);
|
||||
|
||||
/*
|
||||
* Pattern matching
|
||||
*/
|
||||
@@ -1066,10 +1063,6 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
|
||||
#define _EGLIB_MINOR 0
|
||||
|
||||
#define GLIB_CHECK_VERSION(a,b,c) ((a < _EGLIB_MAJOR) || (a == _EGLIB_MAJOR && (b < _EGLIB_MIDDLE || (b == _EGLIB_MIDDLE && c <= _EGLIB_MINOR))))
|
||||
|
||||
#define G_HAVE_API_SUPPORT(x) (x)
|
||||
#define G_UNSUPPORTED_API "%s:%d: '%s' not supported.", __FILE__, __LINE__
|
||||
#define g_unsupported_api(name) G_STMT_START { g_warning (G_UNSUPPORTED_API, name); } G_STMT_END
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
if (context->parser.end_element != NULL && context->state == START_ELEMENT){
|
||||
context->parser.end_element (context, ename, context->user_data, error);
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (ename);
|
||||
free (ename);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-47
@@ -25,45 +25,15 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
|
||||
static GMemVTable sGMemVTable = { malloc, realloc, free, calloc };
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
sGMemVTable.calloc = vtable->calloc ? vtable->calloc : calloc;
|
||||
sGMemVTable.realloc = vtable->realloc ? vtable->realloc : realloc;
|
||||
sGMemVTable.malloc = vtable->malloc ? vtable->malloc : malloc;
|
||||
sGMemVTable.free = vtable->free ? vtable->free : free;
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL sGMemVTable.free
|
||||
#define G_REALLOC_INTERNAL sGMemVTable.realloc
|
||||
#define G_CALLOC_INTERNAL sGMemVTable.calloc
|
||||
#define G_MALLOC_INTERNAL sGMemVTable.malloc
|
||||
#else
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL free
|
||||
#define G_REALLOC_INTERNAL realloc
|
||||
#define G_CALLOC_INTERNAL calloc
|
||||
#define G_MALLOC_INTERNAL malloc
|
||||
#endif
|
||||
void
|
||||
g_free (void *ptr)
|
||||
{
|
||||
if (ptr != NULL)
|
||||
G_FREE_INTERNAL (ptr);
|
||||
free (ptr);
|
||||
}
|
||||
|
||||
gpointer
|
||||
@@ -88,7 +58,7 @@ gpointer g_realloc (gpointer obj, gsize size)
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
ptr = G_REALLOC_INTERNAL (obj, size);
|
||||
ptr = realloc (obj, size);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", size);
|
||||
@@ -100,31 +70,27 @@ g_malloc (gsize x)
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = G_MALLOC_INTERNAL (x);
|
||||
ptr = malloc (x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_calloc (gsize n, gsize x)
|
||||
{
|
||||
gpointer ptr;
|
||||
if (!x || !n)
|
||||
return 0;
|
||||
ptr = G_CALLOC_INTERNAL (n, x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i (%i * %i) bytes", x*n, n, x);
|
||||
}
|
||||
gpointer g_malloc0 (gsize x)
|
||||
{
|
||||
return g_calloc (1,x);
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = calloc(1,x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_try_malloc (gsize x)
|
||||
{
|
||||
if (x)
|
||||
return G_MALLOC_INTERNAL (x);
|
||||
return malloc (x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,8 +98,8 @@ gpointer g_try_malloc (gsize x)
|
||||
gpointer g_try_realloc (gpointer obj, gsize size)
|
||||
{
|
||||
if (!size) {
|
||||
G_FREE_INTERNAL (obj);
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
return G_REALLOC_INTERNAL (obj, size);
|
||||
return realloc (obj, size);
|
||||
}
|
||||
+6
-52
@@ -39,69 +39,23 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static pthread_mutex_t env_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
/* MONO Comment
|
||||
*
|
||||
* As per the UNIX spec,
|
||||
* "The return value from getenv() may point to static data which may be overwritten by subsequent calls to getenv(), setenv(), or unsetenv()."
|
||||
* Source: Unix Manual Pages for getenv, IEEE Std 1003.1
|
||||
*
|
||||
* This means that using pointers returned from getenv may (and does) lead to many
|
||||
* pointers which refer to the same piece of memory. When one is freed, all will be freed.
|
||||
*
|
||||
* This is unsafe and an ergonomics risk to fix in the callers. While the caller could lock,
|
||||
* this introduces the risk for looping or exiting while inside of a lock. For this reason,
|
||||
* g_getenv does not mimic the behavior of POSIX getenv anymore.
|
||||
*
|
||||
* The memory address returned will be unique to the invocaton, and must be freed.
|
||||
* */
|
||||
gchar *
|
||||
g_getenv (const gchar *variable)
|
||||
const gchar *
|
||||
g_getenv(const gchar *variable)
|
||||
{
|
||||
gchar *ret = NULL;
|
||||
pthread_mutex_lock (&env_lock);
|
||||
gchar *res = getenv(variable);
|
||||
if (res)
|
||||
ret = g_strdup(res);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function checks if the given variable is non-NULL
|
||||
* in the environment. It's useful because it removes memory
|
||||
* freeing requirements.
|
||||
*
|
||||
*/
|
||||
gboolean
|
||||
g_hasenv (const gchar *variable)
|
||||
{
|
||||
pthread_mutex_lock (&env_lock);
|
||||
gchar *res = getenv(variable);
|
||||
gboolean not_null = (res != NULL);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
|
||||
return not_null;
|
||||
return getenv(variable);
|
||||
}
|
||||
|
||||
gboolean
|
||||
g_setenv(const gchar *variable, const gchar *value, gboolean overwrite)
|
||||
{
|
||||
gboolean res;
|
||||
pthread_mutex_lock (&env_lock);
|
||||
res = (setenv(variable, value, overwrite) == 0);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
return res;
|
||||
return setenv(variable, value, overwrite) == 0;
|
||||
}
|
||||
|
||||
void
|
||||
g_unsetenv(const gchar *variable)
|
||||
{
|
||||
pthread_mutex_lock (&env_lock);
|
||||
unsetenv(variable);
|
||||
pthread_mutex_unlock (&env_lock);
|
||||
}
|
||||
|
||||
gchar*
|
||||
@@ -127,7 +81,7 @@ get_pw_data (void)
|
||||
{
|
||||
#ifdef HAVE_GETPWUID_R
|
||||
struct passwd pw;
|
||||
struct passwd *result = NULL;
|
||||
struct passwd *result;
|
||||
char buf [4096];
|
||||
#endif
|
||||
|
||||
@@ -145,7 +99,7 @@ get_pw_data (void)
|
||||
|
||||
#ifdef HAVE_GETPWUID_R
|
||||
if (home_dir == NULL || user_name == NULL) {
|
||||
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0 && result) {
|
||||
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
|
||||
if (home_dir == NULL)
|
||||
home_dir = g_strdup (pw.pw_dir);
|
||||
if (user_name == NULL)
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* gmisc-win32-uwp.c: UWP misc support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
gunichar2 buf[19];
|
||||
gint ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
assert (ccBuf <= 9);
|
||||
if (ccBuf != 0) {
|
||||
buf[ccBuf - 1] = L'-';
|
||||
ccBuf = GetLocaleInfoEx (LOCALE_NAME_USER_DEFAULT, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
assert (ccBuf <= 9);
|
||||
}
|
||||
|
||||
// Check for GetLocaleInfoEx failure.
|
||||
if (ccBuf == 0)
|
||||
buf[0] = L'\0';
|
||||
|
||||
return u16to8 (buf);
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gmisc_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
+14
-59
@@ -26,26 +26,14 @@
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <windows.h>
|
||||
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#include <assert.h>
|
||||
|
||||
gboolean
|
||||
g_hasenv (const gchar *variable)
|
||||
{
|
||||
return g_getenv (variable) != NULL;
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
g_getenv(const gchar *variable)
|
||||
{
|
||||
gunichar2 *var, *buffer;
|
||||
@@ -96,18 +84,16 @@ g_unsetenv(const gchar *variable)
|
||||
g_free(var);
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
gchar*
|
||||
g_win32_getlocale(void)
|
||||
{
|
||||
LCID lcid = GetThreadLocale();
|
||||
gchar buf[19];
|
||||
gint ccBuf = GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
buf[ccBuf - 1] = '-';
|
||||
ccBuf += GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return g_strdup (buf);
|
||||
ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return strdup(buf);
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_path_is_absolute (const char *filename)
|
||||
@@ -127,51 +113,19 @@ g_path_is_absolute (const char *filename)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if _MSC_VER && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
static gchar*
|
||||
g_get_known_folder_path (void)
|
||||
{
|
||||
gchar *folder_path = NULL;
|
||||
PWSTR profile_path = NULL;
|
||||
HRESULT hr = SHGetKnownFolderPath (&FOLDERID_Profile, KF_FLAG_DEFAULT, NULL, &profile_path);
|
||||
if (SUCCEEDED(hr)) {
|
||||
folder_path = u16to8 (profile_path);
|
||||
CoTaskMemFree (profile_path);
|
||||
}
|
||||
|
||||
return folder_path;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline gchar *
|
||||
g_get_known_folder_path (void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
const gchar *
|
||||
g_get_home_dir (void)
|
||||
{
|
||||
gchar *home_dir = g_get_known_folder_path ();
|
||||
|
||||
if (!home_dir) {
|
||||
home_dir = (gchar *) g_getenv ("USERPROFILE");
|
||||
}
|
||||
|
||||
if (!home_dir) {
|
||||
const gchar *drive = g_getenv ("HOMEDRIVE");
|
||||
const gchar *path = g_getenv ("HOMEPATH");
|
||||
|
||||
if (drive && path) {
|
||||
home_dir = g_malloc (strlen (drive) + strlen (path) + 1);
|
||||
if (home_dir) {
|
||||
sprintf (home_dir, "%s%s", drive, path);
|
||||
}
|
||||
/* FIXME */
|
||||
const gchar *drive = g_getenv ("HOMEDRIVE");
|
||||
const gchar *path = g_getenv ("HOMEPATH");
|
||||
gchar *home_dir = NULL;
|
||||
|
||||
if (drive && path) {
|
||||
home_dir = g_malloc(strlen(drive) + strlen(path) +1);
|
||||
if (home_dir) {
|
||||
sprintf(home_dir, "%s%s", drive, path);
|
||||
}
|
||||
g_free (drive);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
return home_dir;
|
||||
@@ -206,3 +160,4 @@ g_get_tmp_dir (void)
|
||||
}
|
||||
return tmp_dir;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef __G_MODULE_WINDOWS_INTERNALS_H__
|
||||
#define __G_MODULE_WINDOWS_INTERNALS_H__
|
||||
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <gmodule.h>
|
||||
|
||||
gpointer
|
||||
w32_find_symbol (const gchar *symbol_name);
|
||||
#endif /* G_OS_WIN32 */
|
||||
#endif /* __G_MODULE_WINDOWS_INTERNALS_H__ */
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* gmodule-win32-uwp.c: UWP gmodule support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#include <windows.h>
|
||||
#include <gmodule-win32-internals.h>
|
||||
|
||||
gpointer
|
||||
w32_find_symbol (const gchar *symbol_name)
|
||||
{
|
||||
g_unsupported_api ("EnumProcessModules");
|
||||
SetLastError (ERROR_NOT_SUPPORTED);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
g_module_error (void)
|
||||
{
|
||||
gchar *ret = NULL;
|
||||
TCHAR buf [1024];
|
||||
DWORD code = GetLastError ();
|
||||
|
||||
if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
|
||||
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, G_N_ELEMENTS (buf) - 1, NULL) )
|
||||
buf[0] = TEXT('\0');
|
||||
|
||||
ret = u16to8 (buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gmodule_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
@@ -28,11 +28,10 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
#include <gmodule-win32-internals.h>
|
||||
|
||||
#define LIBSUFFIX ".dll"
|
||||
#define LIBPREFIX ""
|
||||
@@ -69,8 +68,7 @@ g_module_open (const gchar *file, GModuleFlags flags)
|
||||
return module;
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
gpointer
|
||||
static gpointer
|
||||
w32_find_symbol (const gchar *symbol_name)
|
||||
{
|
||||
HMODULE *modules;
|
||||
@@ -116,7 +114,6 @@ w32_find_symbol (const gchar *symbol_name)
|
||||
g_free (modules);
|
||||
return NULL;
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
@@ -137,7 +134,6 @@ g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
|
||||
}
|
||||
}
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
const gchar *
|
||||
g_module_error (void)
|
||||
{
|
||||
@@ -154,7 +150,6 @@ g_module_error (void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
gboolean
|
||||
g_module_close (GModule *module)
|
||||
|
||||
+9
-10
@@ -31,6 +31,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* The current fatal levels, error is always fatal */
|
||||
static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
|
||||
static GLogFunc default_log_func;
|
||||
@@ -47,17 +49,15 @@ g_print (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0) {
|
||||
va_end (args);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
if (!stdout_handler)
|
||||
stdout_handler = default_stdout_handler;
|
||||
|
||||
stdout_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -67,17 +67,15 @@ g_printerr (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0) {
|
||||
va_end (args);
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
}
|
||||
va_end (args);
|
||||
|
||||
if (!stderr_handler)
|
||||
stderr_handler = default_stderr_handler;
|
||||
|
||||
stderr_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
GLogLevelFlags
|
||||
@@ -109,11 +107,11 @@ g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,
|
||||
if (!default_log_func)
|
||||
default_log_func = g_log_default_handler;
|
||||
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
default_log_func (log_domain, log_level, msg, default_log_func_user_data);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -137,6 +135,7 @@ g_assertion_message (const gchar *format, ...)
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
#if PLATFORM_ANDROID
|
||||
#include <android/log.h>
|
||||
|
||||
|
||||
+5
-108
@@ -32,23 +32,13 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/*
|
||||
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
|
||||
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
|
||||
* rather than free.
|
||||
*/
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
|
||||
gchar *
|
||||
g_strndup (const gchar *str, gsize n)
|
||||
{
|
||||
#if defined (HAVE_STRNDUP) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
#ifdef HAVE_STRNDUP
|
||||
return strndup (str, n);
|
||||
#else
|
||||
if (str) {
|
||||
@@ -62,37 +52,6 @@ g_strndup (const gchar *str, gsize n)
|
||||
#endif
|
||||
}
|
||||
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap)
|
||||
{
|
||||
#if defined (HAVE_VASPRINTF) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
return vasprintf (ret, fmt, ap);
|
||||
#else
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = g_malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
g_strfreev (gchar **str_array)
|
||||
{
|
||||
@@ -174,7 +133,7 @@ g_strdup_vprintf (const gchar *format, va_list args)
|
||||
int n;
|
||||
char *ret;
|
||||
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
|
||||
@@ -189,7 +148,7 @@ g_strdup_printf (const gchar *format, ...)
|
||||
int n;
|
||||
|
||||
va_start (args, format);
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
va_end (args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
@@ -197,72 +156,10 @@ g_strdup_printf (const gchar *format, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Max error number we support. It's empirically found by looking at our target OS.
|
||||
|
||||
Last this was checked was June-2017.
|
||||
|
||||
Apple is at 106.
|
||||
Android is at 133.
|
||||
*/
|
||||
#define MONO_ERRNO_MAX 200
|
||||
#define str(s) #s
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static pthread_mutex_t strerror_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
#endif
|
||||
|
||||
static char *error_messages [MONO_ERRNO_MAX];
|
||||
|
||||
const gchar *
|
||||
g_strerror (gint errnum)
|
||||
{
|
||||
if (errnum < 0)
|
||||
errnum = -errnum;
|
||||
if (errnum >= MONO_ERRNO_MAX)
|
||||
return ("Error number higher than " str (MONO_ERRNO_MAX));
|
||||
|
||||
if (!error_messages [errnum]) {
|
||||
#ifndef G_OS_WIN32
|
||||
pthread_mutex_lock (&strerror_lock);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRERROR_R
|
||||
char tmp_buff [128]; //Quite arbitrary, should be large enough
|
||||
char *buff = tmp_buff;
|
||||
int buff_len = sizeof (tmp_buff);
|
||||
int r;
|
||||
buff [0] = 0;
|
||||
|
||||
while ((r = strerror_r (errnum, buff, buff_len - 1))) {
|
||||
if (r != ERANGE) {
|
||||
buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
|
||||
break;
|
||||
}
|
||||
if (buff == tmp_buff)
|
||||
buff = g_malloc (buff_len * 2);
|
||||
else
|
||||
buff = g_realloc (buff, buff_len * 2);
|
||||
buff_len *= 2;
|
||||
//Spec is not clean on whether size argument includes space for null terminator or not
|
||||
}
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup (buff);
|
||||
if (buff != tmp_buff)
|
||||
g_free (buff);
|
||||
#else
|
||||
if (!error_messages [errnum])
|
||||
error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
pthread_mutex_unlock (&strerror_lock);
|
||||
#endif
|
||||
|
||||
}
|
||||
return error_messages [errnum];
|
||||
return strerror (errnum);
|
||||
}
|
||||
|
||||
gchar *
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* gunicode-win32-uwp.c: UWP unicode support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
|
||||
#define CODESET 1
|
||||
#include <windows.h>
|
||||
|
||||
extern const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
static char buf [14];
|
||||
CPINFOEXA cp_info;
|
||||
|
||||
GetCPInfoExA (CP_ACP, 0, &cp_info);
|
||||
sprintf (buf, "CP%u", cp_info.CodePage);
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_gunicode_win32_uwp_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* gunicode-win32.c: Windows unicode support.
|
||||
*
|
||||
* Copyright 2016 Microsoft
|
||||
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
|
||||
#define CODESET 1
|
||||
#include <windows.h>
|
||||
|
||||
extern const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
static char buf [14];
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
*charset = my_charset;
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
|
||||
#else /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
|
||||
void __mono_win32_mono_gunicode_win32_quiet_lnk4221(void) {}
|
||||
#endif
|
||||
#endif /* G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT) */
|
||||
+14
-6
@@ -39,13 +39,18 @@
|
||||
#include <unicode-data.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#if defined(_MSC_VER) || defined(G_OS_WIN32)
|
||||
/* FIXME */
|
||||
# define CODESET 1
|
||||
# include <windows.h>
|
||||
#else
|
||||
# ifdef HAVE_LOCALCHARSET_H
|
||||
# include <localcharset.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
const char *my_charset;
|
||||
static const char *my_charset;
|
||||
static gboolean is_utf8;
|
||||
|
||||
/*
|
||||
* Character set conversion
|
||||
@@ -200,13 +205,16 @@ g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, gs
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
static gboolean is_utf8;
|
||||
|
||||
gboolean
|
||||
g_get_charset (G_CONST_RETURN char **charset)
|
||||
{
|
||||
if (my_charset == NULL) {
|
||||
#ifdef G_OS_WIN32
|
||||
static char buf [14];
|
||||
sprintf (buf, "CP%u", GetACP ());
|
||||
my_charset = buf;
|
||||
is_utf8 = FALSE;
|
||||
#else
|
||||
/* These shouldn't be heap allocated */
|
||||
#if defined(HAVE_LOCALCHARSET_H)
|
||||
my_charset = locale_charset ();
|
||||
@@ -214,6 +222,7 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
my_charset = "UTF-8";
|
||||
#endif
|
||||
is_utf8 = strcmp (my_charset, "UTF-8") == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (charset != NULL)
|
||||
@@ -221,7 +230,6 @@ g_get_charset (G_CONST_RETURN char **charset)
|
||||
|
||||
return is_utf8;
|
||||
}
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
gchar *
|
||||
g_locale_to_utf8 (const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap)
|
||||
{
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __VASPRINTF_H
|
||||
#define __VASPRINTF_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <config.h>
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#endif /* __VASPRINTF_H */
|
||||
@@ -28,10 +28,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "test.h"
|
||||
|
||||
#ifndef DRIVER_EXTERNAL_TESTS
|
||||
#include "tests.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
@@ -105,11 +102,7 @@ static void print_help(char *s)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#ifdef DRIVER_EXTERNAL_MAIN
|
||||
gint run_tests_main(gint argc, gchar **argv)
|
||||
#else
|
||||
gint main(gint argc, gchar **argv)
|
||||
#endif
|
||||
{
|
||||
gint i, j, c, iterations = 1;
|
||||
StringArray *tests_to_run = NULL;
|
||||
|
||||
+8
-1
@@ -46,6 +46,13 @@
|
||||
#include "test.h"
|
||||
|
||||
extern gint global_passed, global_tests;
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
/* systen does not provide a vasprintf function, use the one
|
||||
provided within eglib itself */
|
||||
extern int vasprintf(char **ret, const char *format, va_list ap);
|
||||
#endif
|
||||
|
||||
static gchar *last_result = NULL;
|
||||
|
||||
gboolean
|
||||
@@ -176,7 +183,7 @@ FAILED(const gchar *format, ...)
|
||||
return NULL;
|
||||
#else
|
||||
va_start(args, format);
|
||||
n = g_vasprintf(&ret, format, args);
|
||||
n = vasprintf(&ret, format, args);
|
||||
va_end(args);
|
||||
|
||||
if(n == -1) {
|
||||
|
||||
@@ -5,32 +5,6 @@
|
||||
#include "cygconfig.h"
|
||||
#else
|
||||
|
||||
#ifndef HAVE_WINAPI_FAMILY_SUPPORT
|
||||
|
||||
#define HAVE_WINAPI_FAMILY_SUPPORT
|
||||
|
||||
/* WIN API Family support */
|
||||
#include <winapifamily.h>
|
||||
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 1
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 0
|
||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 1
|
||||
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
|
||||
#error Unsupported WINAPI family
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_CLASSIC_WINAPI_SUPPORT 0
|
||||
#define HAVE_UWP_WINAPI_SUPPORT 0
|
||||
#ifndef HAVE_EXTERN_DEFINED_WINAPI_SUPPORT
|
||||
#error Unsupported WINAPI family
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
|
||||
+1
Submodule external/Lucene.Net.Light added at 85978b7eb9.
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
This is a copy of a few libunwind headers from https://android.googlesource.com/platform/external/libunwind
|
||||
|
||||
We can't make the repo a git submodule because it contains a folder called 'aux' which
|
||||
is reserved on Windows and would break on checkout there.
|
||||
|
||||
These files are unmodified from the originals and should preferably stay that
|
||||
way to avoid merge hell.
|
||||
|
||||
Commit: 338c9755cfe3d009c3dfff7d108e2c3ddaa6f3bb (android-6.0.1_r24)
|
||||
@@ -0,0 +1,219 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2001-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
Copyright (C) 2013 Linaro Limited
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET aarch64
|
||||
#define UNW_TARGET_AARCH64 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int64_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no aarch64-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* 64-bit general registers. */
|
||||
UNW_AARCH64_X0,
|
||||
UNW_AARCH64_X1,
|
||||
UNW_AARCH64_X2,
|
||||
UNW_AARCH64_X3,
|
||||
UNW_AARCH64_X4,
|
||||
UNW_AARCH64_X5,
|
||||
UNW_AARCH64_X6,
|
||||
UNW_AARCH64_X7,
|
||||
UNW_AARCH64_X8,
|
||||
|
||||
/* Temporary registers. */
|
||||
UNW_AARCH64_X9,
|
||||
UNW_AARCH64_X10,
|
||||
UNW_AARCH64_X11,
|
||||
UNW_AARCH64_X12,
|
||||
UNW_AARCH64_X13,
|
||||
UNW_AARCH64_X14,
|
||||
UNW_AARCH64_X15,
|
||||
|
||||
/* Intra-procedure-call temporary registers. */
|
||||
UNW_AARCH64_X16,
|
||||
UNW_AARCH64_X17,
|
||||
|
||||
/* Callee-saved registers. */
|
||||
UNW_AARCH64_X18,
|
||||
UNW_AARCH64_X19,
|
||||
UNW_AARCH64_X20,
|
||||
UNW_AARCH64_X21,
|
||||
UNW_AARCH64_X22,
|
||||
UNW_AARCH64_X23,
|
||||
UNW_AARCH64_X24,
|
||||
UNW_AARCH64_X25,
|
||||
UNW_AARCH64_X26,
|
||||
UNW_AARCH64_X27,
|
||||
UNW_AARCH64_X28,
|
||||
|
||||
/* 64-bit frame pointer. */
|
||||
UNW_AARCH64_X29,
|
||||
|
||||
/* 64-bit link register. */
|
||||
UNW_AARCH64_X30,
|
||||
|
||||
/* 64-bit stack pointer. */
|
||||
UNW_AARCH64_SP = 31,
|
||||
UNW_AARCH64_PC,
|
||||
UNW_AARCH64_PSTATE,
|
||||
|
||||
/* 128-bit FP/Advanced SIMD registers. */
|
||||
UNW_AARCH64_V0 = 64,
|
||||
UNW_AARCH64_V1,
|
||||
UNW_AARCH64_V2,
|
||||
UNW_AARCH64_V3,
|
||||
UNW_AARCH64_V4,
|
||||
UNW_AARCH64_V5,
|
||||
UNW_AARCH64_V6,
|
||||
UNW_AARCH64_V7,
|
||||
UNW_AARCH64_V8,
|
||||
UNW_AARCH64_V9,
|
||||
UNW_AARCH64_V10,
|
||||
UNW_AARCH64_V11,
|
||||
UNW_AARCH64_V12,
|
||||
UNW_AARCH64_V13,
|
||||
UNW_AARCH64_V14,
|
||||
UNW_AARCH64_V15,
|
||||
UNW_AARCH64_V16,
|
||||
UNW_AARCH64_V17,
|
||||
UNW_AARCH64_V18,
|
||||
UNW_AARCH64_V19,
|
||||
UNW_AARCH64_V20,
|
||||
UNW_AARCH64_V21,
|
||||
UNW_AARCH64_V22,
|
||||
UNW_AARCH64_V23,
|
||||
UNW_AARCH64_V24,
|
||||
UNW_AARCH64_V25,
|
||||
UNW_AARCH64_V26,
|
||||
UNW_AARCH64_V27,
|
||||
UNW_AARCH64_V28,
|
||||
UNW_AARCH64_V29,
|
||||
UNW_AARCH64_V30,
|
||||
UNW_AARCH64_V31,
|
||||
|
||||
UNW_AARCH64_FPSR,
|
||||
UNW_AARCH64_FPCR,
|
||||
|
||||
/* For AArch64, the CFA is the value of SP (x31) at the call site of the
|
||||
previous frame. */
|
||||
UNW_AARCH64_CFA = UNW_AARCH64_SP,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
|
||||
|
||||
UNW_TDEP_IP = UNW_AARCH64_X30,
|
||||
UNW_TDEP_SP = UNW_AARCH64_SP,
|
||||
UNW_TDEP_EH = UNW_AARCH64_X0,
|
||||
|
||||
}
|
||||
aarch64_regnum_t;
|
||||
|
||||
/* Use R0 through R3 to pass exception handling information. */
|
||||
#define UNW_TDEP_NUM_EH_REGS 4
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
|
||||
/* On AArch64, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
/* ANDROID support update. */
|
||||
/* There is no getcontext in Android. */
|
||||
#define unw_tdep_getcontext(uc) (({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
"stp x0, x1, [%[base], #0]\n" \
|
||||
"stp x2, x3, [%[base], #16]\n" \
|
||||
"stp x4, x5, [%[base], #32]\n" \
|
||||
"stp x6, x7, [%[base], #48]\n" \
|
||||
"stp x8, x9, [%[base], #64]\n" \
|
||||
"stp x10, x11, [%[base], #80]\n" \
|
||||
"stp x12, x13, [%[base], #96]\n" \
|
||||
"stp x14, x13, [%[base], #112]\n" \
|
||||
"stp x16, x17, [%[base], #128]\n" \
|
||||
"stp x18, x19, [%[base], #144]\n" \
|
||||
"stp x20, x21, [%[base], #160]\n" \
|
||||
"stp x22, x23, [%[base], #176]\n" \
|
||||
"stp x24, x25, [%[base], #192]\n" \
|
||||
"stp x26, x27, [%[base], #208]\n" \
|
||||
"stp x28, x29, [%[base], #224]\n" \
|
||||
"str x30, [%[base], #240]\n" \
|
||||
"mov x1, sp\n" \
|
||||
"stp x1, x30, [%[base], #248]\n" \
|
||||
: [base] "+r" (unw_base) : : "x1", "memory"); \
|
||||
}), 0)
|
||||
/* End of ANDROID update. */
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
+308
@@ -0,0 +1,308 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2008 CodeSourcery
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define UNW_TARGET arm
|
||||
#define UNW_TARGET_ARM 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
|
||||
/* FIXME for ARM. Too big? What do other things use for similar tasks? */
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_ARM_R0,
|
||||
UNW_ARM_R1,
|
||||
UNW_ARM_R2,
|
||||
UNW_ARM_R3,
|
||||
UNW_ARM_R4,
|
||||
UNW_ARM_R5,
|
||||
UNW_ARM_R6,
|
||||
UNW_ARM_R7,
|
||||
UNW_ARM_R8,
|
||||
UNW_ARM_R9,
|
||||
UNW_ARM_R10,
|
||||
UNW_ARM_R11,
|
||||
UNW_ARM_R12,
|
||||
UNW_ARM_R13,
|
||||
UNW_ARM_R14,
|
||||
UNW_ARM_R15,
|
||||
|
||||
/* VFPv2 s0-s31 (obsolescent numberings). */
|
||||
UNW_ARM_S0 = 64,
|
||||
UNW_ARM_S1,
|
||||
UNW_ARM_S2,
|
||||
UNW_ARM_S3,
|
||||
UNW_ARM_S4,
|
||||
UNW_ARM_S5,
|
||||
UNW_ARM_S6,
|
||||
UNW_ARM_S7,
|
||||
UNW_ARM_S8,
|
||||
UNW_ARM_S9,
|
||||
UNW_ARM_S10,
|
||||
UNW_ARM_S11,
|
||||
UNW_ARM_S12,
|
||||
UNW_ARM_S13,
|
||||
UNW_ARM_S14,
|
||||
UNW_ARM_S15,
|
||||
UNW_ARM_S16,
|
||||
UNW_ARM_S17,
|
||||
UNW_ARM_S18,
|
||||
UNW_ARM_S19,
|
||||
UNW_ARM_S20,
|
||||
UNW_ARM_S21,
|
||||
UNW_ARM_S22,
|
||||
UNW_ARM_S23,
|
||||
UNW_ARM_S24,
|
||||
UNW_ARM_S25,
|
||||
UNW_ARM_S26,
|
||||
UNW_ARM_S27,
|
||||
UNW_ARM_S28,
|
||||
UNW_ARM_S29,
|
||||
UNW_ARM_S30,
|
||||
UNW_ARM_S31,
|
||||
|
||||
/* FPA register numberings. */
|
||||
UNW_ARM_F0 = 96,
|
||||
UNW_ARM_F1,
|
||||
UNW_ARM_F2,
|
||||
UNW_ARM_F3,
|
||||
UNW_ARM_F4,
|
||||
UNW_ARM_F5,
|
||||
UNW_ARM_F6,
|
||||
UNW_ARM_F7,
|
||||
|
||||
/* iWMMXt GR register numberings. */
|
||||
UNW_ARM_wCGR0 = 104,
|
||||
UNW_ARM_wCGR1,
|
||||
UNW_ARM_wCGR2,
|
||||
UNW_ARM_wCGR3,
|
||||
UNW_ARM_wCGR4,
|
||||
UNW_ARM_wCGR5,
|
||||
UNW_ARM_wCGR6,
|
||||
UNW_ARM_wCGR7,
|
||||
|
||||
/* iWMMXt register numberings. */
|
||||
UNW_ARM_wR0 = 112,
|
||||
UNW_ARM_wR1,
|
||||
UNW_ARM_wR2,
|
||||
UNW_ARM_wR3,
|
||||
UNW_ARM_wR4,
|
||||
UNW_ARM_wR5,
|
||||
UNW_ARM_wR6,
|
||||
UNW_ARM_wR7,
|
||||
UNW_ARM_wR8,
|
||||
UNW_ARM_wR9,
|
||||
UNW_ARM_wR10,
|
||||
UNW_ARM_wR11,
|
||||
UNW_ARM_wR12,
|
||||
UNW_ARM_wR13,
|
||||
UNW_ARM_wR14,
|
||||
UNW_ARM_wR15,
|
||||
|
||||
/* Two-byte encodings from here on. */
|
||||
|
||||
/* SPSR. */
|
||||
UNW_ARM_SPSR = 128,
|
||||
UNW_ARM_SPSR_FIQ,
|
||||
UNW_ARM_SPSR_IRQ,
|
||||
UNW_ARM_SPSR_ABT,
|
||||
UNW_ARM_SPSR_UND,
|
||||
UNW_ARM_SPSR_SVC,
|
||||
|
||||
/* User mode registers. */
|
||||
UNW_ARM_R8_USR = 144,
|
||||
UNW_ARM_R9_USR,
|
||||
UNW_ARM_R10_USR,
|
||||
UNW_ARM_R11_USR,
|
||||
UNW_ARM_R12_USR,
|
||||
UNW_ARM_R13_USR,
|
||||
UNW_ARM_R14_USR,
|
||||
|
||||
/* FIQ registers. */
|
||||
UNW_ARM_R8_FIQ = 151,
|
||||
UNW_ARM_R9_FIQ,
|
||||
UNW_ARM_R10_FIQ,
|
||||
UNW_ARM_R11_FIQ,
|
||||
UNW_ARM_R12_FIQ,
|
||||
UNW_ARM_R13_FIQ,
|
||||
UNW_ARM_R14_FIQ,
|
||||
|
||||
/* IRQ registers. */
|
||||
UNW_ARM_R13_IRQ = 158,
|
||||
UNW_ARM_R14_IRQ,
|
||||
|
||||
/* ABT registers. */
|
||||
UNW_ARM_R13_ABT = 160,
|
||||
UNW_ARM_R14_ABT,
|
||||
|
||||
/* UND registers. */
|
||||
UNW_ARM_R13_UND = 162,
|
||||
UNW_ARM_R14_UND,
|
||||
|
||||
/* SVC registers. */
|
||||
UNW_ARM_R13_SVC = 164,
|
||||
UNW_ARM_R14_SVC,
|
||||
|
||||
/* iWMMXt control registers. */
|
||||
UNW_ARM_wC0 = 192,
|
||||
UNW_ARM_wC1,
|
||||
UNW_ARM_wC2,
|
||||
UNW_ARM_wC3,
|
||||
UNW_ARM_wC4,
|
||||
UNW_ARM_wC5,
|
||||
UNW_ARM_wC6,
|
||||
UNW_ARM_wC7,
|
||||
|
||||
/* VFPv3/Neon 64-bit registers. */
|
||||
UNW_ARM_D0 = 256,
|
||||
UNW_ARM_D1,
|
||||
UNW_ARM_D2,
|
||||
UNW_ARM_D3,
|
||||
UNW_ARM_D4,
|
||||
UNW_ARM_D5,
|
||||
UNW_ARM_D6,
|
||||
UNW_ARM_D7,
|
||||
UNW_ARM_D8,
|
||||
UNW_ARM_D9,
|
||||
UNW_ARM_D10,
|
||||
UNW_ARM_D11,
|
||||
UNW_ARM_D12,
|
||||
UNW_ARM_D13,
|
||||
UNW_ARM_D14,
|
||||
UNW_ARM_D15,
|
||||
UNW_ARM_D16,
|
||||
UNW_ARM_D17,
|
||||
UNW_ARM_D18,
|
||||
UNW_ARM_D19,
|
||||
UNW_ARM_D20,
|
||||
UNW_ARM_D21,
|
||||
UNW_ARM_D22,
|
||||
UNW_ARM_D23,
|
||||
UNW_ARM_D24,
|
||||
UNW_ARM_D25,
|
||||
UNW_ARM_D26,
|
||||
UNW_ARM_D27,
|
||||
UNW_ARM_D28,
|
||||
UNW_ARM_D29,
|
||||
UNW_ARM_D30,
|
||||
UNW_ARM_D31,
|
||||
|
||||
/* For ARM, the CFA is the value of SP (r13) at the call site in the
|
||||
previous frame. */
|
||||
UNW_ARM_CFA,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_ARM_D31,
|
||||
|
||||
UNW_TDEP_IP = UNW_ARM_R14, /* A little white lie. */
|
||||
UNW_TDEP_SP = UNW_ARM_R13,
|
||||
UNW_TDEP_EH = UNW_ARM_R0 /* FIXME. */
|
||||
}
|
||||
arm_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 2 /* FIXME for ARM. */
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On ARM, we define our own unw_tdep_context instead of using ucontext_t.
|
||||
This allows us to support systems that don't support getcontext and
|
||||
therefore do not define ucontext_t. */
|
||||
typedef struct unw_tdep_context
|
||||
{
|
||||
unsigned long regs[16];
|
||||
}
|
||||
unw_tdep_context_t;
|
||||
|
||||
/* There is no getcontext() on ARM. Use a stub version which only saves GP
|
||||
registers. FIXME: Not ideal, may not be sufficient for all libunwind
|
||||
use cases. Stores pc+8, which is only approximately correct, really. */
|
||||
#ifndef __thumb__
|
||||
#define unw_tdep_getcontext(uc) (({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
"stmia %[base], {r0-r15}" \
|
||||
: : [base] "r" (unw_base) : "memory"); \
|
||||
}), 0)
|
||||
#else /* __thumb__ */
|
||||
#define unw_tdep_getcontext(uc) (({ \
|
||||
unw_tdep_context_t *unw_ctx = (uc); \
|
||||
register unsigned long *unw_base asm ("r0") = unw_ctx->regs; \
|
||||
__asm__ __volatile__ ( \
|
||||
".align 2\nbx pc\nnop\n.code 32\n" \
|
||||
"stmia %[base], {r0-r15}\n" \
|
||||
"orr %[base], pc, #1\nbx %[base]" \
|
||||
: [base] "+r" (unw_base) : : "memory", "cc"); \
|
||||
}), 0)
|
||||
#endif
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no arm-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
@@ -0,0 +1,308 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2001-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
/* ANDROID support update. */
|
||||
#include <sys/types.h>
|
||||
/* End of ANDROID update. */
|
||||
|
||||
#define UNW_VERSION_MAJOR 1
|
||||
#define UNW_VERSION_MINOR 1
|
||||
#define UNW_VERSION_EXTRA
|
||||
|
||||
#define UNW_VERSION_CODE(maj,min) (((maj) << 16) | (min))
|
||||
#define UNW_VERSION UNW_VERSION_CODE(UNW_VERSION_MAJOR, UNW_VERSION_MINOR)
|
||||
|
||||
#define UNW_PASTE2(x,y) x##y
|
||||
#define UNW_PASTE(x,y) UNW_PASTE2(x,y)
|
||||
#define UNW_OBJ(fn) UNW_PASTE(UNW_PREFIX, fn)
|
||||
#define UNW_ARCH_OBJ(fn) UNW_PASTE(UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_), fn)
|
||||
|
||||
#ifdef UNW_LOCAL_ONLY
|
||||
# ifdef UNW_ADDITIONAL_PREFIX
|
||||
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UUL,UNW_TARGET),_)
|
||||
# else
|
||||
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UL,UNW_TARGET),_)
|
||||
# endif
|
||||
#else /* !UNW_LOCAL_ONLY */
|
||||
# ifdef UNW_ADDITIONAL_PREFIX
|
||||
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_UU,UNW_TARGET),_)
|
||||
# else
|
||||
# define UNW_PREFIX UNW_PASTE(UNW_PASTE(_U,UNW_TARGET),_)
|
||||
# endif
|
||||
#endif /* !UNW_LOCAL_ONLY */
|
||||
|
||||
/* Error codes. The unwind routines return the *negated* values of
|
||||
these error codes on error and a non-negative value on success. */
|
||||
typedef enum
|
||||
{
|
||||
UNW_ESUCCESS = 0, /* no error */
|
||||
UNW_EUNSPEC, /* unspecified (general) error */
|
||||
UNW_ENOMEM, /* out of memory */
|
||||
UNW_EBADREG, /* bad register number */
|
||||
UNW_EREADONLYREG, /* attempt to write read-only register */
|
||||
UNW_ESTOPUNWIND, /* stop unwinding */
|
||||
UNW_EINVALIDIP, /* invalid IP */
|
||||
UNW_EBADFRAME, /* bad frame */
|
||||
UNW_EINVAL, /* unsupported operation or bad value */
|
||||
UNW_EBADVERSION, /* unwind info has unsupported version */
|
||||
UNW_ENOINFO /* no unwind info found */
|
||||
}
|
||||
unw_error_t;
|
||||
|
||||
/* The following enum defines the indices for a couple of
|
||||
(pseudo-)registers which have the same meaning across all
|
||||
platforms. (RO) means read-only. (RW) means read-write. General
|
||||
registers (aka "integer registers") are expected to start with
|
||||
index 0. The number of such registers is architecture-dependent.
|
||||
The remaining indices can be used as an architecture sees fit. The
|
||||
last valid register index is given by UNW_REG_LAST. */
|
||||
typedef enum
|
||||
{
|
||||
UNW_REG_IP = UNW_TDEP_IP, /* (rw) instruction pointer (pc) */
|
||||
UNW_REG_SP = UNW_TDEP_SP, /* (ro) stack pointer */
|
||||
UNW_REG_EH = UNW_TDEP_EH, /* (rw) exception-handling reg base */
|
||||
UNW_REG_LAST = UNW_TDEP_LAST_REG
|
||||
}
|
||||
unw_frame_regnum_t;
|
||||
|
||||
/* Number of exception-handler argument registers: */
|
||||
#define UNW_NUM_EH_REGS UNW_TDEP_NUM_EH_REGS
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_CACHE_NONE, /* no caching */
|
||||
UNW_CACHE_GLOBAL, /* shared global cache */
|
||||
UNW_CACHE_PER_THREAD /* per-thread caching */
|
||||
}
|
||||
unw_caching_policy_t;
|
||||
|
||||
typedef int unw_regnum_t;
|
||||
|
||||
/* The unwind cursor starts at the youngest (most deeply nested) frame
|
||||
and is used to track the frame state as the unwinder steps from
|
||||
frame to frame. It is safe to make (shallow) copies of variables
|
||||
of this type. */
|
||||
typedef struct unw_cursor
|
||||
{
|
||||
unw_word_t opaque[UNW_TDEP_CURSOR_LEN];
|
||||
}
|
||||
unw_cursor_t;
|
||||
|
||||
/* This type encapsulates the entire (preserved) machine-state. */
|
||||
typedef unw_tdep_context_t unw_context_t;
|
||||
|
||||
/* unw_getcontext() fills the unw_context_t pointed to by UC with the
|
||||
machine state as it exists at the call-site. For implementation
|
||||
reasons, this needs to be a target-dependent macro. It's easiest
|
||||
to think of unw_getcontext() as being identical to getcontext(). */
|
||||
#define unw_getcontext(uc) unw_tdep_getcontext(uc)
|
||||
|
||||
/* Return 1 if register number R is a floating-point register, zero
|
||||
otherwise.
|
||||
This routine is signal-safe. */
|
||||
#define unw_is_fpreg(r) unw_tdep_is_fpreg(r)
|
||||
|
||||
typedef unw_tdep_fpreg_t unw_fpreg_t;
|
||||
|
||||
typedef struct unw_addr_space *unw_addr_space_t;
|
||||
|
||||
/* Each target may define it's own set of flags, but bits 0-15 are
|
||||
reserved for general libunwind-use. */
|
||||
#define UNW_PI_FLAG_FIRST_TDEP_BIT 16
|
||||
/* The information comes from a .debug_frame section. */
|
||||
#define UNW_PI_FLAG_DEBUG_FRAME 32
|
||||
|
||||
typedef struct unw_proc_info
|
||||
{
|
||||
unw_word_t start_ip; /* first IP covered by this procedure */
|
||||
unw_word_t end_ip; /* first IP NOT covered by this procedure */
|
||||
unw_word_t lsda; /* address of lang.-spec. data area (if any) */
|
||||
unw_word_t handler; /* optional personality routine */
|
||||
unw_word_t gp; /* global-pointer value for this procedure */
|
||||
unw_word_t flags; /* misc. flags */
|
||||
|
||||
int format; /* unwind-info format (arch-specific) */
|
||||
int unwind_info_size; /* size of the information (if applicable) */
|
||||
void *unwind_info; /* unwind-info (arch-specific) */
|
||||
unw_tdep_proc_info_t extra; /* target-dependent auxiliary proc-info */
|
||||
}
|
||||
unw_proc_info_t;
|
||||
|
||||
/* These are backend callback routines that provide access to the
|
||||
state of a "remote" process. This can be used, for example, to
|
||||
unwind another process through the ptrace() interface. */
|
||||
typedef struct unw_accessors
|
||||
{
|
||||
/* Look up the unwind info associated with instruction-pointer IP.
|
||||
On success, the routine fills in the PROC_INFO structure. */
|
||||
int (*find_proc_info) (unw_addr_space_t, unw_word_t, unw_proc_info_t *,
|
||||
int, void *);
|
||||
|
||||
/* Release any resources (e.g., memory) that were allocated for
|
||||
the unwind info returned in by a previous call to
|
||||
find_proc_info() with NEED_UNWIND_INFO set to 1. */
|
||||
void (*put_unwind_info) (unw_addr_space_t, unw_proc_info_t *, void *);
|
||||
|
||||
/* Return the list-head of the dynamically registered unwind
|
||||
info. */
|
||||
int (*get_dyn_info_list_addr) (unw_addr_space_t, unw_word_t *, void *);
|
||||
|
||||
/* Access aligned word at address ADDR. The value is returned
|
||||
according to the endianness of the host (e.g., if the host is
|
||||
little-endian and the target is big-endian, access_mem() needs
|
||||
to byte-swap the value before returning it). */
|
||||
int (*access_mem) (unw_addr_space_t, unw_word_t, unw_word_t *, int,
|
||||
void *);
|
||||
|
||||
/* Access register number REG at address ADDR. */
|
||||
int (*access_reg) (unw_addr_space_t, unw_regnum_t, unw_word_t *, int,
|
||||
void *);
|
||||
|
||||
/* Access register number REG at address ADDR. */
|
||||
int (*access_fpreg) (unw_addr_space_t, unw_regnum_t,
|
||||
unw_fpreg_t *, int, void *);
|
||||
|
||||
int (*resume) (unw_addr_space_t, unw_cursor_t *, void *);
|
||||
|
||||
/* Optional call back to obtain the name of a (static) procedure.
|
||||
Dynamically generated procedures are handled automatically by
|
||||
libunwind. This callback is optional and may be set to
|
||||
NULL. */
|
||||
int (*get_proc_name) (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
}
|
||||
unw_accessors_t;
|
||||
|
||||
typedef enum unw_save_loc_type
|
||||
{
|
||||
UNW_SLT_NONE, /* register is not saved ("not an l-value") */
|
||||
UNW_SLT_MEMORY, /* register has been saved in memory */
|
||||
UNW_SLT_REG /* register has been saved in (another) register */
|
||||
}
|
||||
unw_save_loc_type_t;
|
||||
|
||||
typedef struct unw_save_loc
|
||||
{
|
||||
unw_save_loc_type_t type;
|
||||
union
|
||||
{
|
||||
unw_word_t addr; /* valid if type==UNW_SLT_MEMORY */
|
||||
unw_regnum_t regnum; /* valid if type==UNW_SLT_REG */
|
||||
}
|
||||
u;
|
||||
unw_tdep_save_loc_t extra; /* target-dependent additional information */
|
||||
}
|
||||
unw_save_loc_t;
|
||||
|
||||
/* ANDROID support update. */
|
||||
typedef struct unw_map_cursor
|
||||
{
|
||||
void *map_list;
|
||||
void *cur_map;
|
||||
}
|
||||
unw_map_cursor_t;
|
||||
|
||||
typedef struct unw_map
|
||||
{
|
||||
unw_word_t start;
|
||||
unw_word_t end;
|
||||
unw_word_t offset;
|
||||
unw_word_t load_base;
|
||||
char *path;
|
||||
int flags;
|
||||
}
|
||||
unw_map_t;
|
||||
/* End of ANDROID update. */
|
||||
|
||||
/* These routines work both for local and remote unwinding. */
|
||||
|
||||
#define unw_local_access_addr_space_init UNW_OBJ(local_access_addr_space_init)
|
||||
#define unw_local_addr_space UNW_OBJ(local_addr_space)
|
||||
#define unw_create_addr_space UNW_OBJ(create_addr_space)
|
||||
#define unw_destroy_addr_space UNW_OBJ(destroy_addr_space)
|
||||
#define unw_get_accessors UNW_ARCH_OBJ(get_accessors)
|
||||
#define unw_init_local UNW_OBJ(init_local)
|
||||
#define unw_init_remote UNW_OBJ(init_remote)
|
||||
#define unw_step UNW_OBJ(step)
|
||||
#define unw_resume UNW_OBJ(resume)
|
||||
#define unw_get_proc_info UNW_OBJ(get_proc_info)
|
||||
#define unw_get_proc_info_by_ip UNW_OBJ(get_proc_info_by_ip)
|
||||
#define unw_get_reg UNW_OBJ(get_reg)
|
||||
#define unw_set_reg UNW_OBJ(set_reg)
|
||||
#define unw_get_fpreg UNW_OBJ(get_fpreg)
|
||||
#define unw_set_fpreg UNW_OBJ(set_fpreg)
|
||||
#define unw_get_save_loc UNW_OBJ(get_save_loc)
|
||||
#define unw_is_signal_frame UNW_OBJ(is_signal_frame)
|
||||
#define unw_handle_signal_frame UNW_OBJ(handle_signal_frame)
|
||||
#define unw_get_proc_name UNW_OBJ(get_proc_name)
|
||||
#define unw_get_proc_name_by_ip UNW_OBJ(get_proc_name_by_ip)
|
||||
#define unw_set_caching_policy UNW_OBJ(set_caching_policy)
|
||||
#define unw_regname UNW_ARCH_OBJ(regname)
|
||||
#define unw_flush_cache UNW_ARCH_OBJ(flush_cache)
|
||||
#define unw_strerror UNW_ARCH_OBJ(strerror)
|
||||
|
||||
extern void unw_local_access_addr_space_init (unw_addr_space_t);
|
||||
extern unw_addr_space_t unw_create_addr_space (unw_accessors_t *, int);
|
||||
extern void unw_destroy_addr_space (unw_addr_space_t);
|
||||
extern unw_accessors_t *unw_get_accessors (unw_addr_space_t);
|
||||
extern void unw_flush_cache (unw_addr_space_t, unw_word_t, unw_word_t);
|
||||
extern int unw_set_caching_policy (unw_addr_space_t, unw_caching_policy_t);
|
||||
extern const char *unw_regname (unw_regnum_t);
|
||||
|
||||
extern int unw_init_local (unw_cursor_t *, unw_context_t *);
|
||||
extern int unw_init_remote (unw_cursor_t *, unw_addr_space_t, void *);
|
||||
extern int unw_step (unw_cursor_t *);
|
||||
extern int unw_resume (unw_cursor_t *);
|
||||
extern int unw_get_proc_info (unw_cursor_t *, unw_proc_info_t *);
|
||||
extern int unw_get_proc_info_by_ip (unw_addr_space_t, unw_word_t,
|
||||
unw_proc_info_t *, void *);
|
||||
extern int unw_get_reg (unw_cursor_t *, int, unw_word_t *);
|
||||
extern int unw_set_reg (unw_cursor_t *, int, unw_word_t);
|
||||
extern int unw_get_fpreg (unw_cursor_t *, int, unw_fpreg_t *);
|
||||
extern int unw_set_fpreg (unw_cursor_t *, int, unw_fpreg_t);
|
||||
extern int unw_get_save_loc (unw_cursor_t *, int, unw_save_loc_t *);
|
||||
extern int unw_is_signal_frame (unw_cursor_t *);
|
||||
extern int unw_handle_signal_frame (unw_cursor_t *);
|
||||
extern int unw_get_proc_name (unw_cursor_t *, char *, size_t, unw_word_t *);
|
||||
extern int unw_get_proc_name_by_ip (unw_addr_space_t, unw_word_t, char *,
|
||||
size_t, unw_word_t *, void *);
|
||||
extern const char *unw_strerror (int);
|
||||
extern int unw_backtrace (void **, int);
|
||||
|
||||
/* ANDROID support update. */
|
||||
extern int unw_map_local_cursor_valid (unw_map_cursor_t *);
|
||||
extern void unw_map_local_cursor_get (unw_map_cursor_t *);
|
||||
extern int unw_map_local_cursor_get_next (unw_map_cursor_t *, unw_map_t *);
|
||||
extern int unw_map_local_create (void);
|
||||
extern void unw_map_local_destroy (void);
|
||||
extern void unw_map_set (unw_addr_space_t, unw_map_cursor_t *);
|
||||
extern void unw_map_cursor_reset (unw_map_cursor_t *);
|
||||
extern void unw_map_cursor_clear (unw_map_cursor_t *);
|
||||
extern int unw_map_cursor_create (unw_map_cursor_t *, pid_t);
|
||||
extern void unw_map_cursor_destroy (unw_map_cursor_t *);
|
||||
extern int unw_map_cursor_get_next (unw_map_cursor_t *, unw_map_t *);
|
||||
/* End of ANDROID update. */
|
||||
|
||||
extern unw_addr_space_t unw_local_addr_space;
|
||||
@@ -0,0 +1,73 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef libunwind_coredump_h
|
||||
#define libunwind_coredump_h
|
||||
|
||||
#include <libunwind.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper routines which make it easy to use libunwind on a coredump.
|
||||
They're available only if UNW_REMOTE_ONLY is _not_ defined and they
|
||||
aren't really part of the libunwind API. They are implemented in a
|
||||
archive library called libunwind-coredump.a. */
|
||||
|
||||
struct UCD_info;
|
||||
|
||||
extern struct UCD_info *_UCD_create(const char *filename);
|
||||
extern void _UCD_destroy(struct UCD_info *);
|
||||
|
||||
extern int _UCD_get_num_threads(struct UCD_info *);
|
||||
extern void _UCD_select_thread(struct UCD_info *, int);
|
||||
extern pid_t _UCD_get_pid(struct UCD_info *);
|
||||
extern int _UCD_get_cursig(struct UCD_info *);
|
||||
extern int _UCD_add_backing_file_at_segment(struct UCD_info *, int phdr_no, const char *filename);
|
||||
extern int _UCD_add_backing_file_at_vaddr(struct UCD_info *,
|
||||
unsigned long vaddr,
|
||||
const char *filename);
|
||||
|
||||
extern int _UCD_find_proc_info (unw_addr_space_t, unw_word_t,
|
||||
unw_proc_info_t *, int, void *);
|
||||
extern void _UCD_put_unwind_info (unw_addr_space_t, unw_proc_info_t *, void *);
|
||||
extern int _UCD_get_dyn_info_list_addr (unw_addr_space_t, unw_word_t *,
|
||||
void *);
|
||||
extern int _UCD_access_mem (unw_addr_space_t, unw_word_t, unw_word_t *, int,
|
||||
void *);
|
||||
extern int _UCD_access_reg (unw_addr_space_t, unw_regnum_t, unw_word_t *,
|
||||
int, void *);
|
||||
extern int _UCD_access_fpreg (unw_addr_space_t, unw_regnum_t, unw_fpreg_t *,
|
||||
int, void *);
|
||||
extern int _UCD_get_proc_name (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
extern int _UCD_resume (unw_addr_space_t, unw_cursor_t *, void *);
|
||||
extern unw_accessors_t _UCD_accessors;
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libunwind_coredump_h */
|
||||
@@ -0,0 +1,210 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2002-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
/* This file defines the runtime-support routines for dynamically
|
||||
generated code. Even though it is implemented as part of libunwind,
|
||||
it is logically separate from the interface to perform the actual
|
||||
unwinding. In particular, this interface is always used in the
|
||||
context of the unwind target, whereas the rest of the unwind API is
|
||||
used in context of the process that is doing the unwind (which may be
|
||||
a debugger running on another machine, for example).
|
||||
|
||||
Note that the data-structures declared here server a dual purpose:
|
||||
when a program registers a dynamically generated procedure, it uses
|
||||
these structures directly. On the other hand, with remote-unwinding,
|
||||
the data-structures are read from the remote process's memory and
|
||||
translated into internalized versions. To facilitate remote-access,
|
||||
the following rules should be followed in declaring these structures:
|
||||
|
||||
(1) Declare a member as a pointer only if the the information the
|
||||
member points to needs to be internalized as well (e.g., a
|
||||
string representing a procedure name should be declared as
|
||||
"const char *", but the instruction pointer should be declared
|
||||
as unw_word_t).
|
||||
|
||||
(2) Provide sufficient padding to ensure that no implicit padding
|
||||
will be needed on any of the supported target architectures. For
|
||||
the time being, padding data structures with the assumption that
|
||||
sizeof (unw_word_t) == 8 should be sufficient. (Note: it's not
|
||||
impossible to internalize structures with internal padding, but
|
||||
it does make the process a bit harder).
|
||||
|
||||
(3) Don't declare members that contain bitfields or floating-point
|
||||
values.
|
||||
|
||||
(4) Don't declare members with enumeration types. Declare them as
|
||||
int32_t instead. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_DYN_STOP = 0, /* end-of-unwind-info marker */
|
||||
UNW_DYN_SAVE_REG, /* save register to another register */
|
||||
UNW_DYN_SPILL_FP_REL, /* frame-pointer-relative register spill */
|
||||
UNW_DYN_SPILL_SP_REL, /* stack-pointer-relative register spill */
|
||||
UNW_DYN_ADD, /* add constant value to a register */
|
||||
UNW_DYN_POP_FRAMES, /* drop one or more stack frames */
|
||||
UNW_DYN_LABEL_STATE, /* name the current state */
|
||||
UNW_DYN_COPY_STATE, /* set the region's entry-state */
|
||||
UNW_DYN_ALIAS /* get unwind info from an alias */
|
||||
}
|
||||
unw_dyn_operation_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_INFO_FORMAT_DYNAMIC, /* unw_dyn_proc_info_t */
|
||||
UNW_INFO_FORMAT_TABLE, /* unw_dyn_table_t */
|
||||
UNW_INFO_FORMAT_REMOTE_TABLE, /* unw_dyn_remote_table_t */
|
||||
UNW_INFO_FORMAT_ARM_EXIDX /* ARM specific unwind info */
|
||||
}
|
||||
unw_dyn_info_format_t;
|
||||
|
||||
typedef struct unw_dyn_op
|
||||
{
|
||||
int8_t tag; /* what operation? */
|
||||
int8_t qp; /* qualifying predicate register */
|
||||
int16_t reg; /* what register */
|
||||
int32_t when; /* when does it take effect? */
|
||||
unw_word_t val; /* auxiliary value */
|
||||
}
|
||||
unw_dyn_op_t;
|
||||
|
||||
typedef struct unw_dyn_region_info
|
||||
{
|
||||
struct unw_dyn_region_info *next; /* linked list of regions */
|
||||
int32_t insn_count; /* region length (# of instructions) */
|
||||
uint32_t op_count; /* length of op-array */
|
||||
unw_dyn_op_t op[1]; /* variable-length op-array */
|
||||
}
|
||||
unw_dyn_region_info_t;
|
||||
|
||||
typedef struct unw_dyn_proc_info
|
||||
{
|
||||
unw_word_t name_ptr; /* address of human-readable procedure name */
|
||||
unw_word_t handler; /* address of personality routine */
|
||||
uint32_t flags;
|
||||
int32_t pad0;
|
||||
unw_dyn_region_info_t *regions;
|
||||
}
|
||||
unw_dyn_proc_info_t;
|
||||
|
||||
typedef struct unw_dyn_table_info
|
||||
{
|
||||
unw_word_t name_ptr; /* addr. of table name (e.g., library name) */
|
||||
unw_word_t segbase; /* segment base */
|
||||
unw_word_t table_len; /* must be a multiple of sizeof(unw_word_t)! */
|
||||
unw_word_t *table_data;
|
||||
}
|
||||
unw_dyn_table_info_t;
|
||||
|
||||
typedef struct unw_dyn_remote_table_info
|
||||
{
|
||||
unw_word_t name_ptr; /* addr. of table name (e.g., library name) */
|
||||
unw_word_t segbase; /* segment base */
|
||||
unw_word_t table_len; /* must be a multiple of sizeof(unw_word_t)! */
|
||||
unw_word_t table_data;
|
||||
}
|
||||
unw_dyn_remote_table_info_t;
|
||||
|
||||
typedef struct unw_dyn_info
|
||||
{
|
||||
/* doubly-linked list of dyn-info structures: */
|
||||
struct unw_dyn_info *next;
|
||||
struct unw_dyn_info *prev;
|
||||
unw_word_t start_ip; /* first IP covered by this entry */
|
||||
unw_word_t end_ip; /* first IP NOT covered by this entry */
|
||||
unw_word_t gp; /* global-pointer in effect for this entry */
|
||||
int32_t format; /* real type: unw_dyn_info_format_t */
|
||||
int32_t pad;
|
||||
union
|
||||
{
|
||||
unw_dyn_proc_info_t pi;
|
||||
unw_dyn_table_info_t ti;
|
||||
unw_dyn_remote_table_info_t rti;
|
||||
}
|
||||
u;
|
||||
}
|
||||
unw_dyn_info_t;
|
||||
|
||||
typedef struct unw_dyn_info_list
|
||||
{
|
||||
uint32_t version;
|
||||
uint32_t generation;
|
||||
unw_dyn_info_t *first;
|
||||
}
|
||||
unw_dyn_info_list_t;
|
||||
|
||||
/* Return the size (in bytes) of an unw_dyn_region_info_t structure that can
|
||||
hold OP_COUNT ops. */
|
||||
#define _U_dyn_region_info_size(op_count) \
|
||||
((char *) (((unw_dyn_region_info_t *) NULL)->op + (op_count)) \
|
||||
- (char *) NULL)
|
||||
|
||||
/* Register the unwind info for a single procedure.
|
||||
This routine is NOT signal-safe. */
|
||||
extern void _U_dyn_register (unw_dyn_info_t *);
|
||||
|
||||
/* Cancel the unwind info for a single procedure.
|
||||
This routine is NOT signal-safe. */
|
||||
extern void _U_dyn_cancel (unw_dyn_info_t *);
|
||||
|
||||
|
||||
/* Convenience routines. */
|
||||
|
||||
#define _U_dyn_op(_tag, _qp, _when, _reg, _val) \
|
||||
((unw_dyn_op_t) { (_tag), (_qp), (_reg), (_when), (_val) })
|
||||
|
||||
#define _U_dyn_op_save_reg(op, qp, when, reg, dst) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_SAVE_REG, (qp), (when), (reg), (dst)))
|
||||
|
||||
#define _U_dyn_op_spill_fp_rel(op, qp, when, reg, offset) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_SPILL_FP_REL, (qp), (when), (reg), \
|
||||
(offset)))
|
||||
|
||||
#define _U_dyn_op_spill_sp_rel(op, qp, when, reg, offset) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_SPILL_SP_REL, (qp), (when), (reg), \
|
||||
(offset)))
|
||||
|
||||
#define _U_dyn_op_add(op, qp, when, reg, value) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_ADD, (qp), (when), (reg), (value)))
|
||||
|
||||
#define _U_dyn_op_pop_frames(op, qp, when, num_frames) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_POP_FRAMES, (qp), (when), 0, (num_frames)))
|
||||
|
||||
#define _U_dyn_op_label_state(op, label) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_LABEL_STATE, _U_QP_TRUE, -1, 0, (label)))
|
||||
|
||||
#define _U_dyn_op_copy_state(op, label) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_COPY_STATE, _U_QP_TRUE, -1, 0, (label)))
|
||||
|
||||
#define _U_dyn_op_alias(op, qp, when, addr) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_ALIAS, (qp), (when), 0, (addr)))
|
||||
|
||||
#define _U_dyn_op_stop(op) \
|
||||
(*(op) = _U_dyn_op (UNW_DYN_STOP, _U_QP_TRUE, -1, 0, 0))
|
||||
|
||||
/* The target-dependent qualifying predicate which is always TRUE. On
|
||||
IA-64, that's p0 (0), on non-predicated architectures, the value is
|
||||
ignored. */
|
||||
#define _U_QP_TRUE _U_TDEP_QP_TRUE
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2003-2004 Hewlett-Packard Co
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET hppa
|
||||
#define UNW_TARGET_HPPA 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
#define UNW_TDEP_CURSOR_LEN 511
|
||||
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct { unw_word_t bits[2]; } raw;
|
||||
double val;
|
||||
}
|
||||
unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* Note: general registers are expected to start with index 0.
|
||||
This convention facilitates architecture-independent
|
||||
implementation of the C++ exception handling ABI. See
|
||||
_Unwind_SetGR() and _Unwind_GetGR() for details. */
|
||||
UNW_HPPA_GR = 0,
|
||||
UNW_HPPA_RP = 2, /* return pointer */
|
||||
UNW_HPPA_FP = 3, /* frame pointer */
|
||||
UNW_HPPA_SP = UNW_HPPA_GR + 30,
|
||||
|
||||
UNW_HPPA_FR = UNW_HPPA_GR + 32,
|
||||
|
||||
UNW_HPPA_IP = UNW_HPPA_FR + 32, /* instruction pointer */
|
||||
|
||||
/* other "preserved" registers (fpsr etc.)... */
|
||||
|
||||
/* PA-RISC has 4 exception-argument registers but they're not
|
||||
contiguous. To deal with this, we define 4 pseudo
|
||||
exception-handling registers which we then alias to the actual
|
||||
physical register. */
|
||||
|
||||
UNW_HPPA_EH0 = UNW_HPPA_IP + 1, /* alias for UNW_HPPA_GR + 20 */
|
||||
UNW_HPPA_EH1 = UNW_HPPA_EH0 + 1, /* alias for UNW_HPPA_GR + 21 */
|
||||
UNW_HPPA_EH2 = UNW_HPPA_EH1 + 1, /* alias for UNW_HPPA_GR + 22 */
|
||||
UNW_HPPA_EH3 = UNW_HPPA_EH2 + 1, /* alias for UNW_HPPA_GR + 31 */
|
||||
|
||||
/* frame info (read-only) */
|
||||
UNW_HPPA_CFA,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_HPPA_IP,
|
||||
|
||||
UNW_TDEP_IP = UNW_HPPA_IP,
|
||||
UNW_TDEP_SP = UNW_HPPA_SP,
|
||||
UNW_TDEP_EH = UNW_HPPA_EH0
|
||||
}
|
||||
hppa_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 4
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On PA-RISC, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#define unw_tdep_is_fpreg(r) ((unsigned) ((r) - UNW_HPPA_FR) < 32)
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no PA-RISC-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_getcontext UNW_ARCH_OBJ (getcontext)
|
||||
extern int unw_tdep_getcontext (unw_tdep_context_t *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2001-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef ia64
|
||||
/* This works around a bug in Intel's ECC v7.0 which defines "ia64"
|
||||
as "1". */
|
||||
# undef ia64
|
||||
#endif
|
||||
|
||||
#ifdef __hpux
|
||||
/* On HP-UX, there is no hope of supporting UNW_LOCAL_ONLY, because
|
||||
it's impossible to obtain the address of the members in the
|
||||
sigcontext structure. */
|
||||
# undef UNW_LOCAL_ONLY
|
||||
# define UNW_GENERIC_ONLY
|
||||
#endif
|
||||
|
||||
#define UNW_TARGET ia64
|
||||
#define UNW_TARGET_IA64 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
#define UNW_TDEP_CURSOR_LEN 511
|
||||
|
||||
/* If this bit is it indicates that the procedure saved all of ar.bsp,
|
||||
ar.bspstore, and ar.rnat. If, additionally, ar.bsp != saved ar.bsp,
|
||||
then this procedure has performed a register-backing-store switch. */
|
||||
#define UNW_PI_FLAG_IA64_RBS_SWITCH_BIT (UNW_PI_FLAG_FIRST_TDEP_BIT + 0)
|
||||
|
||||
#define UNW_PI_FLAG_IA64_RBS_SWITCH (1 << UNW_PI_FLAG_IA64_RBS_SWITCH_BIT)
|
||||
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int64_t unw_sword_t;
|
||||
|
||||
/* On IA-64, we want to access the contents of floating-point
|
||||
registers as a pair of "words", but to ensure 16-byte alignment, we
|
||||
make it a union that contains a "long double". This will do the
|
||||
Right Thing on all known IA-64 platforms, including HP-UX. */
|
||||
typedef union
|
||||
{
|
||||
struct { unw_word_t bits[2]; } raw;
|
||||
long double dummy; /* dummy to force 16-byte alignment */
|
||||
}
|
||||
unw_tdep_fpreg_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no ia64-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* Note: general registers are excepted to start with index 0.
|
||||
This convention facilitates architecture-independent
|
||||
implementation of the C++ exception handling ABI. See
|
||||
_Unwind_SetGR() and _Unwind_GetGR() for details. */
|
||||
UNW_IA64_GR = 0, /* general registers (r0..r127) */
|
||||
UNW_IA64_GP = UNW_IA64_GR + 1,
|
||||
UNW_IA64_TP = UNW_IA64_GR + 13,
|
||||
|
||||
UNW_IA64_NAT = UNW_IA64_GR + 128, /* NaT registers (nat0..nat127) */
|
||||
|
||||
UNW_IA64_FR = UNW_IA64_NAT + 128, /* fp registers (f0..f127) */
|
||||
|
||||
UNW_IA64_AR = UNW_IA64_FR + 128, /* application registers (ar0..r127) */
|
||||
UNW_IA64_AR_RSC = UNW_IA64_AR + 16,
|
||||
UNW_IA64_AR_BSP = UNW_IA64_AR + 17,
|
||||
UNW_IA64_AR_BSPSTORE = UNW_IA64_AR + 18,
|
||||
UNW_IA64_AR_RNAT = UNW_IA64_AR + 19,
|
||||
UNW_IA64_AR_CSD = UNW_IA64_AR + 25,
|
||||
UNW_IA64_AR_26 = UNW_IA64_AR + 26,
|
||||
UNW_IA64_AR_SSD = UNW_IA64_AR_26,
|
||||
UNW_IA64_AR_CCV = UNW_IA64_AR + 32,
|
||||
UNW_IA64_AR_UNAT = UNW_IA64_AR + 36,
|
||||
UNW_IA64_AR_FPSR = UNW_IA64_AR + 40,
|
||||
UNW_IA64_AR_PFS = UNW_IA64_AR + 64,
|
||||
UNW_IA64_AR_LC = UNW_IA64_AR + 65,
|
||||
UNW_IA64_AR_EC = UNW_IA64_AR + 66,
|
||||
|
||||
UNW_IA64_BR = UNW_IA64_AR + 128, /* branch registers (b0..p7) */
|
||||
UNW_IA64_RP = UNW_IA64_BR + 0, /* return pointer (rp) */
|
||||
UNW_IA64_PR = UNW_IA64_BR + 8, /* predicate registers (p0..p63) */
|
||||
UNW_IA64_CFM,
|
||||
|
||||
/* frame info: */
|
||||
UNW_IA64_BSP,
|
||||
UNW_IA64_IP,
|
||||
UNW_IA64_SP,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_IA64_SP,
|
||||
|
||||
UNW_TDEP_IP = UNW_IA64_IP,
|
||||
UNW_TDEP_SP = UNW_IA64_SP,
|
||||
UNW_TDEP_EH = UNW_IA64_GR + 15
|
||||
}
|
||||
ia64_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 4 /* r15-r18 are exception args */
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. On IA-64,
|
||||
we use this to provide the bit number in which a NaT bit gets
|
||||
saved. */
|
||||
uint8_t nat_bitnr;
|
||||
|
||||
/* Padding reserved for future use. */
|
||||
uint8_t reserved[7];
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On IA-64, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#define unw_tdep_is_fpreg(r) ((unsigned) ((r) - UNW_IA64_FR) < 128)
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#ifdef __hpux
|
||||
/* In theory, we could use _Uia64_getcontext() on HP-UX as well, but
|
||||
the benefit of doing so would be marginal given that it can't
|
||||
support UNW_LOCAL_ONLY. */
|
||||
# define unw_tdep_getcontext getcontext
|
||||
#else
|
||||
# define unw_tdep_getcontext UNW_ARCH_OBJ (getcontext)
|
||||
extern int unw_tdep_getcontext (unw_tdep_context_t *);
|
||||
#endif
|
||||
|
||||
/* This is a helper routine to search an ia64 unwind table. If the
|
||||
address-space argument AS points to something other than the local
|
||||
address-space, the memory for the unwind-info will be allocated
|
||||
with malloc(), and should be free()d during the put_unwind_info()
|
||||
callback. This routine is signal-safe for the local-address-space
|
||||
case ONLY. */
|
||||
#define unw_search_ia64_unwind_table UNW_OBJ(search_unwind_table)
|
||||
extern int unw_search_ia64_unwind_table (unw_addr_space_t, unw_word_t,
|
||||
unw_dyn_info_t *, unw_proc_info_t *,
|
||||
int, void *);
|
||||
|
||||
/* This is a helper routine which the get_dyn_info_list_addr()
|
||||
callback can use to locate the special dynamic-info list entry in
|
||||
an IA-64 unwind table. If the entry exists in the table, the
|
||||
list-address is returned. In all other cases, 0 is returned. */
|
||||
extern unw_word_t _Uia64_find_dyn_list (unw_addr_space_t, unw_dyn_info_t *,
|
||||
void *);
|
||||
|
||||
/* This is a helper routine to obtain the kernel-unwind info. It is
|
||||
signal-safe. */
|
||||
extern int _Uia64_get_kernel_table (unw_dyn_info_t *);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2008 CodeSourcery
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#ifdef mips
|
||||
# undef mips
|
||||
#endif
|
||||
|
||||
#define UNW_TARGET mips
|
||||
#define UNW_TARGET_MIPS 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
|
||||
/* FIXME for MIPS. Too big? What do other things use for similar tasks? */
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
/* The size of a "word" varies on MIPS. This type is used for memory
|
||||
addresses and register values. To allow a single library to support
|
||||
multiple ABIs, and to support N32 at all, we must use a 64-bit type
|
||||
even when addresses are only 32 bits. */
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
/* FIXME: MIPS ABIs. */
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_MIPS_R0,
|
||||
UNW_MIPS_R1,
|
||||
UNW_MIPS_R2,
|
||||
UNW_MIPS_R3,
|
||||
UNW_MIPS_R4,
|
||||
UNW_MIPS_R5,
|
||||
UNW_MIPS_R6,
|
||||
UNW_MIPS_R7,
|
||||
UNW_MIPS_R8,
|
||||
UNW_MIPS_R9,
|
||||
UNW_MIPS_R10,
|
||||
UNW_MIPS_R11,
|
||||
UNW_MIPS_R12,
|
||||
UNW_MIPS_R13,
|
||||
UNW_MIPS_R14,
|
||||
UNW_MIPS_R15,
|
||||
UNW_MIPS_R16,
|
||||
UNW_MIPS_R17,
|
||||
UNW_MIPS_R18,
|
||||
UNW_MIPS_R19,
|
||||
UNW_MIPS_R20,
|
||||
UNW_MIPS_R21,
|
||||
UNW_MIPS_R22,
|
||||
UNW_MIPS_R23,
|
||||
UNW_MIPS_R24,
|
||||
UNW_MIPS_R25,
|
||||
UNW_MIPS_R26,
|
||||
UNW_MIPS_R27,
|
||||
UNW_MIPS_R28,
|
||||
UNW_MIPS_R29,
|
||||
UNW_MIPS_R30,
|
||||
UNW_MIPS_R31,
|
||||
|
||||
UNW_MIPS_PC = 34,
|
||||
|
||||
/* FIXME: Other registers! */
|
||||
|
||||
/* For MIPS, the CFA is the value of SP (r29) at the call site in the
|
||||
previous frame. */
|
||||
UNW_MIPS_CFA,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_MIPS_R31,
|
||||
|
||||
UNW_TDEP_IP = UNW_MIPS_R31,
|
||||
UNW_TDEP_SP = UNW_MIPS_R29,
|
||||
UNW_TDEP_EH = UNW_MIPS_R0 /* FIXME. */
|
||||
}
|
||||
mips_regnum_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_MIPS_ABI_O32,
|
||||
UNW_MIPS_ABI_N32,
|
||||
UNW_MIPS_ABI_N64
|
||||
}
|
||||
mips_abi_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 2 /* FIXME for MIPS. */
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On x86, we can directly use ucontext_t as the unwind context. FIXME for
|
||||
MIPS. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no mips-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
/* There is no getcontext() on MIPS. Use a stub version which only saves GP
|
||||
registers. FIXME: Not ideal, may not be sufficient for all libunwind
|
||||
use cases. */
|
||||
#define unw_tdep_getcontext UNW_ARCH_OBJ(getcontext)
|
||||
extern int unw_tdep_getcontext (ucontext_t *uc);
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
@@ -0,0 +1,213 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2006-2007 IBM
|
||||
Contributed by
|
||||
Corey Ashford <[email protected]>
|
||||
Jose Flavio Aguilar Paulino <[email protected]> <[email protected]>
|
||||
|
||||
Copied from libunwind-x86_64.h, modified slightly for building
|
||||
frysk successfully on ppc64, by Wu Zhou <[email protected]>
|
||||
Will be replaced when libunwind is ready on ppc64 platform.
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET ppc32
|
||||
#define UNW_TARGET_PPC32 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/*
|
||||
* This needs to be big enough to accommodate "struct cursor", while
|
||||
* leaving some slack for future expansion. Changing this value will
|
||||
* require recompiling all users of this library. Stack allocation is
|
||||
* relatively cheap and unwind-state copying is relatively rare, so we want
|
||||
* to err on making it rather too big than too small.
|
||||
*
|
||||
* To simplify this whole process, we are at least initially taking the
|
||||
* tack that UNW_PPC32_* map straight across to the .eh_frame column register
|
||||
* numbers. These register numbers come from gcc's source in
|
||||
* gcc/config/rs6000/rs6000.h
|
||||
*
|
||||
* UNW_TDEP_CURSOR_LEN is in terms of unw_word_t size. Since we have 115
|
||||
* elements in the loc array, each sized 2 * unw_word_t, plus the rest of
|
||||
* the cursor struct, this puts us at about 2 * 115 + 40 = 270. Let's
|
||||
* round that up to 280.
|
||||
*/
|
||||
|
||||
#define UNW_TDEP_CURSOR_LEN 280
|
||||
|
||||
#if __WORDSIZE==32
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
#else
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int64_t unw_sword_t;
|
||||
#endif
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_PPC32_R0,
|
||||
UNW_PPC32_R1, /* called STACK_POINTER in gcc */
|
||||
UNW_PPC32_R2,
|
||||
UNW_PPC32_R3,
|
||||
UNW_PPC32_R4,
|
||||
UNW_PPC32_R5,
|
||||
UNW_PPC32_R6,
|
||||
UNW_PPC32_R7,
|
||||
UNW_PPC32_R8,
|
||||
UNW_PPC32_R9,
|
||||
UNW_PPC32_R10,
|
||||
UNW_PPC32_R11, /* called STATIC_CHAIN in gcc */
|
||||
UNW_PPC32_R12,
|
||||
UNW_PPC32_R13,
|
||||
UNW_PPC32_R14,
|
||||
UNW_PPC32_R15,
|
||||
UNW_PPC32_R16,
|
||||
UNW_PPC32_R17,
|
||||
UNW_PPC32_R18,
|
||||
UNW_PPC32_R19,
|
||||
UNW_PPC32_R20,
|
||||
UNW_PPC32_R21,
|
||||
UNW_PPC32_R22,
|
||||
UNW_PPC32_R23,
|
||||
UNW_PPC32_R24,
|
||||
UNW_PPC32_R25,
|
||||
UNW_PPC32_R26,
|
||||
UNW_PPC32_R27,
|
||||
UNW_PPC32_R28,
|
||||
UNW_PPC32_R29,
|
||||
UNW_PPC32_R30,
|
||||
UNW_PPC32_R31, /* called HARD_FRAME_POINTER in gcc */
|
||||
|
||||
/* Count Register */
|
||||
UNW_PPC32_CTR = 32,
|
||||
/* Fixed-Point Status and Control Register */
|
||||
UNW_PPC32_XER = 33,
|
||||
/* Condition Register */
|
||||
UNW_PPC32_CCR = 34,
|
||||
/* Machine State Register */
|
||||
//UNW_PPC32_MSR = 35,
|
||||
/* MQ or SPR0, not part of generic Power, part of MPC601 */
|
||||
//UNW_PPC32_MQ = 36,
|
||||
/* Link Register */
|
||||
UNW_PPC32_LR = 36,
|
||||
/* Floating Pointer Status and Control Register */
|
||||
UNW_PPC32_FPSCR = 37,
|
||||
|
||||
UNW_PPC32_F0 = 48,
|
||||
UNW_PPC32_F1,
|
||||
UNW_PPC32_F2,
|
||||
UNW_PPC32_F3,
|
||||
UNW_PPC32_F4,
|
||||
UNW_PPC32_F5,
|
||||
UNW_PPC32_F6,
|
||||
UNW_PPC32_F7,
|
||||
UNW_PPC32_F8,
|
||||
UNW_PPC32_F9,
|
||||
UNW_PPC32_F10,
|
||||
UNW_PPC32_F11,
|
||||
UNW_PPC32_F12,
|
||||
UNW_PPC32_F13,
|
||||
UNW_PPC32_F14,
|
||||
UNW_PPC32_F15,
|
||||
UNW_PPC32_F16,
|
||||
UNW_PPC32_F17,
|
||||
UNW_PPC32_F18,
|
||||
UNW_PPC32_F19,
|
||||
UNW_PPC32_F20,
|
||||
UNW_PPC32_F21,
|
||||
UNW_PPC32_F22,
|
||||
UNW_PPC32_F23,
|
||||
UNW_PPC32_F24,
|
||||
UNW_PPC32_F25,
|
||||
UNW_PPC32_F26,
|
||||
UNW_PPC32_F27,
|
||||
UNW_PPC32_F28,
|
||||
UNW_PPC32_F29,
|
||||
UNW_PPC32_F30,
|
||||
UNW_PPC32_F31,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_PPC32_F31,
|
||||
|
||||
UNW_TDEP_IP = UNW_PPC32_LR,
|
||||
UNW_TDEP_SP = UNW_PPC32_R1,
|
||||
UNW_TDEP_EH = UNW_PPC32_R12
|
||||
}
|
||||
ppc32_regnum_t;
|
||||
|
||||
/*
|
||||
* According to David Edelsohn, GNU gcc uses R3, R4, R5, and maybe R6 for
|
||||
* passing parameters to exception handlers.
|
||||
*/
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 4
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On ppc, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
/* XXX this is not ideal: an application should not be prevented from
|
||||
using the "getcontext" name just because it's using libunwind. We
|
||||
can't just use __getcontext() either, because that isn't exported
|
||||
by glibc... */
|
||||
#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no ppc32-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
@@ -0,0 +1,270 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2006-2007 IBM
|
||||
Contributed by
|
||||
Corey Ashford <[email protected]>
|
||||
Jose Flavio Aguilar Paulino <[email protected]> <[email protected]>
|
||||
|
||||
Copied from libunwind-x86_64.h, modified slightly for building
|
||||
frysk successfully on ppc64, by Wu Zhou <[email protected]>
|
||||
Will be replaced when libunwind is ready on ppc64 platform.
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET ppc64
|
||||
#define UNW_TARGET_PPC64 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/*
|
||||
* This needs to be big enough to accommodate "struct cursor", while
|
||||
* leaving some slack for future expansion. Changing this value will
|
||||
* require recompiling all users of this library. Stack allocation is
|
||||
* relatively cheap and unwind-state copying is relatively rare, so we want
|
||||
* to err on making it rather too big than too small.
|
||||
*
|
||||
* To simplify this whole process, we are at least initially taking the
|
||||
* tack that UNW_PPC64_* map straight across to the .eh_frame column register
|
||||
* numbers. These register numbers come from gcc's source in
|
||||
* gcc/config/rs6000/rs6000.h
|
||||
*
|
||||
* UNW_TDEP_CURSOR_LEN is in terms of unw_word_t size. Since we have 115
|
||||
* elements in the loc array, each sized 2 * unw_word_t, plus the rest of
|
||||
* the cursor struct, this puts us at about 2 * 115 + 40 = 270. Let's
|
||||
* round that up to 280.
|
||||
*/
|
||||
|
||||
#define UNW_TDEP_CURSOR_LEN 280
|
||||
|
||||
#if __WORDSIZE==32
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
#else
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int64_t unw_sword_t;
|
||||
#endif
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
/*
|
||||
* Vector register (in PowerPC64 used for AltiVec registers)
|
||||
*/
|
||||
typedef struct {
|
||||
uint64_t halves[2];
|
||||
} unw_tdep_vreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_PPC64_R0,
|
||||
UNW_PPC64_R1, /* called STACK_POINTER in gcc */
|
||||
UNW_PPC64_R2,
|
||||
UNW_PPC64_R3,
|
||||
UNW_PPC64_R4,
|
||||
UNW_PPC64_R5,
|
||||
UNW_PPC64_R6,
|
||||
UNW_PPC64_R7,
|
||||
UNW_PPC64_R8,
|
||||
UNW_PPC64_R9,
|
||||
UNW_PPC64_R10,
|
||||
UNW_PPC64_R11, /* called STATIC_CHAIN in gcc */
|
||||
UNW_PPC64_R12,
|
||||
UNW_PPC64_R13,
|
||||
UNW_PPC64_R14,
|
||||
UNW_PPC64_R15,
|
||||
UNW_PPC64_R16,
|
||||
UNW_PPC64_R17,
|
||||
UNW_PPC64_R18,
|
||||
UNW_PPC64_R19,
|
||||
UNW_PPC64_R20,
|
||||
UNW_PPC64_R21,
|
||||
UNW_PPC64_R22,
|
||||
UNW_PPC64_R23,
|
||||
UNW_PPC64_R24,
|
||||
UNW_PPC64_R25,
|
||||
UNW_PPC64_R26,
|
||||
UNW_PPC64_R27,
|
||||
UNW_PPC64_R28,
|
||||
UNW_PPC64_R29,
|
||||
UNW_PPC64_R30,
|
||||
UNW_PPC64_R31, /* called HARD_FRAME_POINTER in gcc */
|
||||
|
||||
UNW_PPC64_F0 = 32,
|
||||
UNW_PPC64_F1,
|
||||
UNW_PPC64_F2,
|
||||
UNW_PPC64_F3,
|
||||
UNW_PPC64_F4,
|
||||
UNW_PPC64_F5,
|
||||
UNW_PPC64_F6,
|
||||
UNW_PPC64_F7,
|
||||
UNW_PPC64_F8,
|
||||
UNW_PPC64_F9,
|
||||
UNW_PPC64_F10,
|
||||
UNW_PPC64_F11,
|
||||
UNW_PPC64_F12,
|
||||
UNW_PPC64_F13,
|
||||
UNW_PPC64_F14,
|
||||
UNW_PPC64_F15,
|
||||
UNW_PPC64_F16,
|
||||
UNW_PPC64_F17,
|
||||
UNW_PPC64_F18,
|
||||
UNW_PPC64_F19,
|
||||
UNW_PPC64_F20,
|
||||
UNW_PPC64_F21,
|
||||
UNW_PPC64_F22,
|
||||
UNW_PPC64_F23,
|
||||
UNW_PPC64_F24,
|
||||
UNW_PPC64_F25,
|
||||
UNW_PPC64_F26,
|
||||
UNW_PPC64_F27,
|
||||
UNW_PPC64_F28,
|
||||
UNW_PPC64_F29,
|
||||
UNW_PPC64_F30,
|
||||
UNW_PPC64_F31,
|
||||
/* Note that there doesn't appear to be an .eh_frame register column
|
||||
for the FPSCR register. I don't know why this is. Since .eh_frame
|
||||
info is what this implementation uses for unwinding, we have no way
|
||||
to unwind this register, and so we will not expose an FPSCR register
|
||||
number in the libunwind API.
|
||||
*/
|
||||
|
||||
UNW_PPC64_LR = 65,
|
||||
UNW_PPC64_CTR = 66,
|
||||
UNW_PPC64_ARG_POINTER = 67,
|
||||
|
||||
UNW_PPC64_CR0 = 68,
|
||||
UNW_PPC64_CR1,
|
||||
UNW_PPC64_CR2,
|
||||
UNW_PPC64_CR3,
|
||||
UNW_PPC64_CR4,
|
||||
/* CR5 .. CR7 are currently unused */
|
||||
UNW_PPC64_CR5,
|
||||
UNW_PPC64_CR6,
|
||||
UNW_PPC64_CR7,
|
||||
|
||||
UNW_PPC64_XER = 76,
|
||||
|
||||
UNW_PPC64_V0 = 77,
|
||||
UNW_PPC64_V1,
|
||||
UNW_PPC64_V2,
|
||||
UNW_PPC64_V3,
|
||||
UNW_PPC64_V4,
|
||||
UNW_PPC64_V5,
|
||||
UNW_PPC64_V6,
|
||||
UNW_PPC64_V7,
|
||||
UNW_PPC64_V8,
|
||||
UNW_PPC64_V9,
|
||||
UNW_PPC64_V10,
|
||||
UNW_PPC64_V11,
|
||||
UNW_PPC64_V12,
|
||||
UNW_PPC64_V13,
|
||||
UNW_PPC64_V14,
|
||||
UNW_PPC64_V15,
|
||||
UNW_PPC64_V16,
|
||||
UNW_PPC64_V17,
|
||||
UNW_PPC64_V18,
|
||||
UNW_PPC64_V19,
|
||||
UNW_PPC64_V20,
|
||||
UNW_PPC64_V21,
|
||||
UNW_PPC64_V22,
|
||||
UNW_PPC64_V23,
|
||||
UNW_PPC64_V24,
|
||||
UNW_PPC64_V25,
|
||||
UNW_PPC64_V26,
|
||||
UNW_PPC64_V27,
|
||||
UNW_PPC64_V28,
|
||||
UNW_PPC64_V29,
|
||||
UNW_PPC64_V30,
|
||||
UNW_PPC64_V31,
|
||||
|
||||
UNW_PPC64_VRSAVE = 109,
|
||||
UNW_PPC64_VSCR = 110,
|
||||
UNW_PPC64_SPE_ACC = 111,
|
||||
UNW_PPC64_SPEFSCR = 112,
|
||||
|
||||
/* frame info (read-only) */
|
||||
UNW_PPC64_FRAME_POINTER,
|
||||
UNW_PPC64_NIP,
|
||||
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_PPC64_NIP,
|
||||
|
||||
UNW_TDEP_IP = UNW_PPC64_NIP,
|
||||
UNW_TDEP_SP = UNW_PPC64_R1,
|
||||
UNW_TDEP_EH = UNW_PPC64_R12
|
||||
}
|
||||
ppc64_regnum_t;
|
||||
|
||||
/*
|
||||
* According to David Edelsohn, GNU gcc uses R3, R4, R5, and maybe R6 for
|
||||
* passing parameters to exception handlers.
|
||||
*/
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 4
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On ppc64, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
/* XXX this is not ideal: an application should not be prevented from
|
||||
using the "getcontext" name just because it's using libunwind. We
|
||||
can't just use __getcontext() either, because that isn't exported
|
||||
by glibc... */
|
||||
#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no ppc64-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
@@ -0,0 +1,63 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef libunwind_ptrace_h
|
||||
#define libunwind_ptrace_h
|
||||
|
||||
#include <libunwind.h>
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper routines which make it easy to use libunwind via ptrace().
|
||||
They're available only if UNW_REMOTE_ONLY is _not_ defined and they
|
||||
aren't really part of the libunwind API. They are implemented in a
|
||||
archive library called libunwind-ptrace.a. */
|
||||
|
||||
extern void *_UPT_create (pid_t);
|
||||
extern void _UPT_destroy (void *);
|
||||
extern int _UPT_find_proc_info (unw_addr_space_t, unw_word_t,
|
||||
unw_proc_info_t *, int, void *);
|
||||
extern void _UPT_put_unwind_info (unw_addr_space_t, unw_proc_info_t *, void *);
|
||||
extern int _UPT_get_dyn_info_list_addr (unw_addr_space_t, unw_word_t *,
|
||||
void *);
|
||||
extern int _UPT_access_mem (unw_addr_space_t, unw_word_t, unw_word_t *, int,
|
||||
void *);
|
||||
extern int _UPT_access_reg (unw_addr_space_t, unw_regnum_t, unw_word_t *,
|
||||
int, void *);
|
||||
extern int _UPT_access_fpreg (unw_addr_space_t, unw_regnum_t, unw_fpreg_t *,
|
||||
int, void *);
|
||||
extern int _UPT_get_proc_name (unw_addr_space_t, unw_word_t, char *, size_t,
|
||||
unw_word_t *, void *);
|
||||
extern int _UPT_resume (unw_addr_space_t, unw_cursor_t *, void *);
|
||||
extern unw_accessors_t _UPT_accessors;
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* libunwind_ptrace_h */
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2008 CodeSourcery
|
||||
Copyright (C) 2012 Tommi Rantala <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET sh
|
||||
#define UNW_TARGET_SH 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
|
||||
#define UNW_TDEP_CURSOR_LEN 4096
|
||||
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_SH_R0,
|
||||
UNW_SH_R1,
|
||||
UNW_SH_R2,
|
||||
UNW_SH_R3,
|
||||
UNW_SH_R4,
|
||||
UNW_SH_R5,
|
||||
UNW_SH_R6,
|
||||
UNW_SH_R7,
|
||||
UNW_SH_R8,
|
||||
UNW_SH_R9,
|
||||
UNW_SH_R10,
|
||||
UNW_SH_R11,
|
||||
UNW_SH_R12,
|
||||
UNW_SH_R13,
|
||||
UNW_SH_R14,
|
||||
UNW_SH_R15,
|
||||
|
||||
UNW_SH_PC,
|
||||
UNW_SH_PR,
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_SH_PR,
|
||||
|
||||
UNW_TDEP_IP = UNW_SH_PR,
|
||||
UNW_TDEP_SP = UNW_SH_R15,
|
||||
UNW_TDEP_EH = UNW_SH_R0
|
||||
}
|
||||
sh_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 2
|
||||
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no sh-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2002-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET x86
|
||||
#define UNW_TARGET_X86 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
#define UNW_TDEP_CURSOR_LEN 127
|
||||
|
||||
typedef uint32_t unw_word_t;
|
||||
typedef int32_t unw_sword_t;
|
||||
|
||||
typedef union {
|
||||
struct { uint8_t b[4]; } val32;
|
||||
struct { uint8_t b[10]; } val80;
|
||||
struct { uint8_t b[16]; } val128;
|
||||
} unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
/* Note: general registers are expected to start with index 0.
|
||||
This convention facilitates architecture-independent
|
||||
implementation of the C++ exception handling ABI. See
|
||||
_Unwind_SetGR() and _Unwind_GetGR() for details.
|
||||
|
||||
The described register usage convention is based on "System V
|
||||
Application Binary Interface, Intel386 Architecture Processor
|
||||
Supplement, Fourth Edition" at
|
||||
|
||||
http://www.linuxbase.org/spec/refspecs/elf/abi386-4.pdf
|
||||
|
||||
It would have been nice to use the same register numbering as
|
||||
DWARF, but that doesn't work because the libunwind requires
|
||||
that the exception argument registers be consecutive, which the
|
||||
wouldn't be with the DWARF numbering. */
|
||||
UNW_X86_EAX, /* scratch (exception argument 1) */
|
||||
UNW_X86_EDX, /* scratch (exception argument 2) */
|
||||
UNW_X86_ECX, /* scratch */
|
||||
UNW_X86_EBX, /* preserved */
|
||||
UNW_X86_ESI, /* preserved */
|
||||
UNW_X86_EDI, /* preserved */
|
||||
UNW_X86_EBP, /* (optional) frame-register */
|
||||
UNW_X86_ESP, /* (optional) frame-register */
|
||||
UNW_X86_EIP, /* frame-register */
|
||||
UNW_X86_EFLAGS, /* scratch (except for "direction", which is fixed */
|
||||
UNW_X86_TRAPNO, /* scratch */
|
||||
|
||||
/* MMX/stacked-fp registers */
|
||||
UNW_X86_ST0, /* fp return value */
|
||||
UNW_X86_ST1, /* scratch */
|
||||
UNW_X86_ST2, /* scratch */
|
||||
UNW_X86_ST3, /* scratch */
|
||||
UNW_X86_ST4, /* scratch */
|
||||
UNW_X86_ST5, /* scratch */
|
||||
UNW_X86_ST6, /* scratch */
|
||||
UNW_X86_ST7, /* scratch */
|
||||
|
||||
UNW_X86_FCW, /* scratch */
|
||||
UNW_X86_FSW, /* scratch */
|
||||
UNW_X86_FTW, /* scratch */
|
||||
UNW_X86_FOP, /* scratch */
|
||||
UNW_X86_FCS, /* scratch */
|
||||
UNW_X86_FIP, /* scratch */
|
||||
UNW_X86_FEA, /* scratch */
|
||||
UNW_X86_FDS, /* scratch */
|
||||
|
||||
/* SSE registers */
|
||||
UNW_X86_XMM0_lo, /* scratch */
|
||||
UNW_X86_XMM0_hi, /* scratch */
|
||||
UNW_X86_XMM1_lo, /* scratch */
|
||||
UNW_X86_XMM1_hi, /* scratch */
|
||||
UNW_X86_XMM2_lo, /* scratch */
|
||||
UNW_X86_XMM2_hi, /* scratch */
|
||||
UNW_X86_XMM3_lo, /* scratch */
|
||||
UNW_X86_XMM3_hi, /* scratch */
|
||||
UNW_X86_XMM4_lo, /* scratch */
|
||||
UNW_X86_XMM4_hi, /* scratch */
|
||||
UNW_X86_XMM5_lo, /* scratch */
|
||||
UNW_X86_XMM5_hi, /* scratch */
|
||||
UNW_X86_XMM6_lo, /* scratch */
|
||||
UNW_X86_XMM6_hi, /* scratch */
|
||||
UNW_X86_XMM7_lo, /* scratch */
|
||||
UNW_X86_XMM7_hi, /* scratch */
|
||||
|
||||
UNW_X86_MXCSR, /* scratch */
|
||||
|
||||
/* segment registers */
|
||||
UNW_X86_GS, /* special */
|
||||
UNW_X86_FS, /* special */
|
||||
UNW_X86_ES, /* special */
|
||||
UNW_X86_DS, /* special */
|
||||
UNW_X86_SS, /* special */
|
||||
UNW_X86_CS, /* special */
|
||||
UNW_X86_TSS, /* special */
|
||||
UNW_X86_LDT, /* special */
|
||||
|
||||
/* frame info (read-only) */
|
||||
UNW_X86_CFA,
|
||||
|
||||
UNW_X86_XMM0, /* scratch */
|
||||
UNW_X86_XMM1, /* scratch */
|
||||
UNW_X86_XMM2, /* scratch */
|
||||
UNW_X86_XMM3, /* scratch */
|
||||
UNW_X86_XMM4, /* scratch */
|
||||
UNW_X86_XMM5, /* scratch */
|
||||
UNW_X86_XMM6, /* scratch */
|
||||
UNW_X86_XMM7, /* scratch */
|
||||
|
||||
UNW_TDEP_LAST_REG = UNW_X86_XMM7,
|
||||
|
||||
UNW_TDEP_IP = UNW_X86_EIP,
|
||||
UNW_TDEP_SP = UNW_X86_ESP,
|
||||
UNW_TDEP_EH = UNW_X86_EAX
|
||||
}
|
||||
x86_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 2 /* eax and edx are exception args */
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On x86, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no x86-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_getcontext UNW_ARCH_OBJ(getcontext)
|
||||
extern int unw_tdep_getcontext (unw_tdep_context_t *);
|
||||
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
@@ -0,0 +1,145 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2002-2004 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
Modified for x86_64 by Max Asbock <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef LIBUNWIND_H
|
||||
#define LIBUNWIND_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <ucontext.h>
|
||||
|
||||
#define UNW_TARGET x86_64
|
||||
#define UNW_TARGET_X86_64 1
|
||||
|
||||
#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
|
||||
|
||||
/* This needs to be big enough to accommodate "struct cursor", while
|
||||
leaving some slack for future expansion. Changing this value will
|
||||
require recompiling all users of this library. Stack allocation is
|
||||
relatively cheap and unwind-state copying is relatively rare, so we
|
||||
want to err on making it rather too big than too small. */
|
||||
#define UNW_TDEP_CURSOR_LEN 127
|
||||
|
||||
typedef uint64_t unw_word_t;
|
||||
typedef int64_t unw_sword_t;
|
||||
|
||||
typedef long double unw_tdep_fpreg_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UNW_X86_64_RAX,
|
||||
UNW_X86_64_RDX,
|
||||
UNW_X86_64_RCX,
|
||||
UNW_X86_64_RBX,
|
||||
UNW_X86_64_RSI,
|
||||
UNW_X86_64_RDI,
|
||||
UNW_X86_64_RBP,
|
||||
UNW_X86_64_RSP,
|
||||
UNW_X86_64_R8,
|
||||
UNW_X86_64_R9,
|
||||
UNW_X86_64_R10,
|
||||
UNW_X86_64_R11,
|
||||
UNW_X86_64_R12,
|
||||
UNW_X86_64_R13,
|
||||
UNW_X86_64_R14,
|
||||
UNW_X86_64_R15,
|
||||
UNW_X86_64_RIP,
|
||||
#ifdef CONFIG_MSABI_SUPPORT
|
||||
UNW_X86_64_XMM0,
|
||||
UNW_X86_64_XMM1,
|
||||
UNW_X86_64_XMM2,
|
||||
UNW_X86_64_XMM3,
|
||||
UNW_X86_64_XMM4,
|
||||
UNW_X86_64_XMM5,
|
||||
UNW_X86_64_XMM6,
|
||||
UNW_X86_64_XMM7,
|
||||
UNW_X86_64_XMM8,
|
||||
UNW_X86_64_XMM9,
|
||||
UNW_X86_64_XMM10,
|
||||
UNW_X86_64_XMM11,
|
||||
UNW_X86_64_XMM12,
|
||||
UNW_X86_64_XMM13,
|
||||
UNW_X86_64_XMM14,
|
||||
UNW_X86_64_XMM15,
|
||||
UNW_TDEP_LAST_REG = UNW_X86_64_XMM15,
|
||||
#else
|
||||
UNW_TDEP_LAST_REG = UNW_X86_64_RIP,
|
||||
#endif
|
||||
|
||||
/* XXX Add other regs here */
|
||||
|
||||
/* frame info (read-only) */
|
||||
UNW_X86_64_CFA,
|
||||
|
||||
UNW_TDEP_IP = UNW_X86_64_RIP,
|
||||
UNW_TDEP_SP = UNW_X86_64_RSP,
|
||||
UNW_TDEP_BP = UNW_X86_64_RBP,
|
||||
UNW_TDEP_EH = UNW_X86_64_RAX
|
||||
}
|
||||
x86_64_regnum_t;
|
||||
|
||||
#define UNW_TDEP_NUM_EH_REGS 2 /* XXX Not sure what this means */
|
||||
|
||||
typedef struct unw_tdep_save_loc
|
||||
{
|
||||
/* Additional target-dependent info on a save location. */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_save_loc_t;
|
||||
|
||||
/* On x86_64, we can directly use ucontext_t as the unwind context. */
|
||||
typedef ucontext_t unw_tdep_context_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* no x86-64-specific auxiliary proc-info */
|
||||
/* ANDROID support update. */
|
||||
char __reserved;
|
||||
/* End of ANDROID update. */
|
||||
}
|
||||
unw_tdep_proc_info_t;
|
||||
|
||||
#include "libunwind-dynamic.h"
|
||||
#include "libunwind-common.h"
|
||||
|
||||
#define unw_tdep_getcontext UNW_ARCH_OBJ(getcontext)
|
||||
#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
|
||||
|
||||
extern int unw_tdep_getcontext (unw_tdep_context_t *);
|
||||
extern int unw_tdep_is_fpreg (int);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBUNWIND_H */
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/* Provide a real file - not a symlink - as it would cause multiarch conflicts
|
||||
when multiple different arch releases are installed simultaneously. */
|
||||
|
||||
#ifndef UNW_REMOTE_ONLY
|
||||
|
||||
#if defined __aarch64__
|
||||
#include "libunwind-aarch64.h"
|
||||
#elif defined __arm__
|
||||
# include "libunwind-arm.h"
|
||||
#elif defined __hppa__
|
||||
# include "libunwind-hppa.h"
|
||||
#elif defined __ia64__
|
||||
# include "libunwind-ia64.h"
|
||||
#elif defined __mips__
|
||||
# include "libunwind-mips.h"
|
||||
#elif defined __powerpc__ && !defined __powerpc64__
|
||||
# include "libunwind-ppc32.h"
|
||||
#elif defined __powerpc64__
|
||||
# include "libunwind-ppc64.h"
|
||||
#elif defined __sh__
|
||||
# include "libunwind-sh.h"
|
||||
#elif defined __i386__
|
||||
# include "libunwind-x86.h"
|
||||
#elif defined __x86_64__
|
||||
# include "libunwind-x86_64.h"
|
||||
#else
|
||||
# error "Unsupported arch"
|
||||
#endif
|
||||
|
||||
#else /* UNW_REMOTE_ONLY */
|
||||
|
||||
# include "libunwind-arm.h"
|
||||
|
||||
#endif /* UNW_REMOTE_ONLY */
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
/* libunwind - a platform-independent unwind library
|
||||
Copyright (C) 2003 Hewlett-Packard Co
|
||||
Contributed by David Mosberger-Tang <[email protected]>
|
||||
|
||||
This file is part of libunwind.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
#ifndef _UNWIND_H
|
||||
#define _UNWIND_H
|
||||
|
||||
/* For uint64_t */
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Minimal interface as per C++ ABI draft standard:
|
||||
|
||||
http://www.codesourcery.com/cxx-abi/abi-eh.html */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
_URC_NO_REASON = 0,
|
||||
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
|
||||
_URC_FATAL_PHASE2_ERROR = 2,
|
||||
_URC_FATAL_PHASE1_ERROR = 3,
|
||||
_URC_NORMAL_STOP = 4,
|
||||
_URC_END_OF_STACK = 5,
|
||||
_URC_HANDLER_FOUND = 6,
|
||||
_URC_INSTALL_CONTEXT = 7,
|
||||
_URC_CONTINUE_UNWIND = 8
|
||||
}
|
||||
_Unwind_Reason_Code;
|
||||
|
||||
typedef int _Unwind_Action;
|
||||
|
||||
#define _UA_SEARCH_PHASE 1
|
||||
#define _UA_CLEANUP_PHASE 2
|
||||
#define _UA_HANDLER_FRAME 4
|
||||
#define _UA_FORCE_UNWIND 8
|
||||
|
||||
struct _Unwind_Context; /* opaque data-structure */
|
||||
struct _Unwind_Exception; /* forward-declaration */
|
||||
|
||||
typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
|
||||
struct _Unwind_Exception *);
|
||||
|
||||
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action,
|
||||
uint64_t,
|
||||
struct _Unwind_Exception *,
|
||||
struct _Unwind_Context *,
|
||||
void *);
|
||||
|
||||
/* The C++ ABI requires exception_class, private_1, and private_2 to
|
||||
be of type uint64 and the entire structure to be
|
||||
double-word-aligned. Please note that exception_class stays 64-bit
|
||||
even on 32-bit machines for gcc compatibility. */
|
||||
struct _Unwind_Exception
|
||||
{
|
||||
uint64_t exception_class;
|
||||
_Unwind_Exception_Cleanup_Fn exception_cleanup;
|
||||
unsigned long private_1;
|
||||
unsigned long private_2;
|
||||
} __attribute__((__aligned__));
|
||||
|
||||
extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
|
||||
extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,
|
||||
_Unwind_Stop_Fn, void *);
|
||||
extern void _Unwind_Resume (struct _Unwind_Exception *);
|
||||
extern void _Unwind_DeleteException (struct _Unwind_Exception *);
|
||||
extern unsigned long _Unwind_GetGR (struct _Unwind_Context *, int);
|
||||
extern void _Unwind_SetGR (struct _Unwind_Context *, int, unsigned long);
|
||||
extern unsigned long _Unwind_GetIP (struct _Unwind_Context *);
|
||||
extern unsigned long _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
|
||||
extern void _Unwind_SetIP (struct _Unwind_Context *, unsigned long);
|
||||
extern unsigned long _Unwind_GetLanguageSpecificData (struct _Unwind_Context*);
|
||||
extern unsigned long _Unwind_GetRegionStart (struct _Unwind_Context *);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
|
||||
/* Callback for _Unwind_Backtrace(). The backtrace stops immediately
|
||||
if the callback returns any value other than _URC_NO_REASON. */
|
||||
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *,
|
||||
void *);
|
||||
|
||||
/* See http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00082.html for why
|
||||
_UA_END_OF_STACK exists. */
|
||||
# define _UA_END_OF_STACK 16
|
||||
|
||||
/* If the unwind was initiated due to a forced unwind, resume that
|
||||
operation, else re-raise the exception. This is used by
|
||||
__cxa_rethrow(). */
|
||||
extern _Unwind_Reason_Code
|
||||
_Unwind_Resume_or_Rethrow (struct _Unwind_Exception *);
|
||||
|
||||
/* See http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00154.html for why
|
||||
_Unwind_GetBSP() exists. */
|
||||
extern unsigned long _Unwind_GetBSP (struct _Unwind_Context *);
|
||||
|
||||
/* Return the "canonical frame address" for the given context.
|
||||
This is used by NPTL... */
|
||||
extern unsigned long _Unwind_GetCFA (struct _Unwind_Context *);
|
||||
|
||||
/* Return the base-address for data references. */
|
||||
extern unsigned long _Unwind_GetDataRelBase (struct _Unwind_Context *);
|
||||
|
||||
/* Return the base-address for text references. */
|
||||
extern unsigned long _Unwind_GetTextRelBase (struct _Unwind_Context *);
|
||||
|
||||
/* Call _Unwind_Trace_Fn once for each stack-frame, without doing any
|
||||
cleanup. The first frame for which the callback is invoked is the
|
||||
one for the caller of _Unwind_Backtrace(). _Unwind_Backtrace()
|
||||
returns _URC_END_OF_STACK when the backtrace stopped due to
|
||||
reaching the end of the call-chain or _URC_FATAL_PHASE1_ERROR if it
|
||||
stops for any other reason. */
|
||||
extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
|
||||
|
||||
/* Find the start-address of the procedure containing the specified IP
|
||||
or NULL if it cannot be found (e.g., because the function has no
|
||||
unwind info). Note: there is not necessarily a one-to-one
|
||||
correspondence between source-level functions and procedures: some
|
||||
functions don't have unwind-info and others are split into multiple
|
||||
procedures. */
|
||||
extern void *_Unwind_FindEnclosingFunction (void *);
|
||||
|
||||
/* See also Linux Standard Base Spec:
|
||||
http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/libgcc-s.html */
|
||||
|
||||
#endif /* _GNU_SOURCE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _UNWIND_H */
|
||||
Vendored
-1
Submodule external/api-doc-tools deleted from d03e819838.
Vendored
-1
Submodule external/api-snapshot deleted from c1a7bd7e02.
Loaded 100 of 9907 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user