Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Commit 439542d

Browse files
committed
Merge branch 'gnuarmeclipse-dev' into gnuarmeclipse
2 parents 414806e + 3df0fc2 commit 439542d

File tree

2,918 files changed

+209914
-83959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,918 files changed

+209914
-83959
lines changed

.dir-locals.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
((c-mode . ((c-file-style . "stroustrup")
2+
(indent-tabs-mode . nil))))

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
/trace/generated-tcg-tracers.h
1818
/trace/generated-ust-provider.h
1919
/trace/generated-ust.c
20-
/libcacard/trace/generated-tracers.c
20+
/ui/shader/texture-blit-frag.h
21+
/ui/shader/texture-blit-vert.h
2122
*-timestamp
2223
/*-softmmu
2324
/*-darwin-user
2425
/*-linux-user
2526
/*-bsd-user
27+
/ivshmem-client
28+
/ivshmem-server
2629
/libdis*
2730
/libuser
2831
/linux-headers/asm
@@ -32,6 +35,7 @@
3235
/qapi-visit.[ch]
3336
/qapi-event.[ch]
3437
/qmp-commands.h
38+
/qmp-introspect.[ch]
3539
/qmp-marshal.c
3640
/qemu-doc.html
3741
/qemu-tech.html
@@ -47,6 +51,7 @@
4751
/qemu-ga
4852
/qemu-bridge-helper
4953
/qemu-monitor.texi
54+
/qemu-monitor-info.texi
5055
/qmp-commands.txt
5156
/vscclient
5257
/fsdev/virtfs-proxy-helper
@@ -56,6 +61,7 @@
5661
*.cp
5762
*.dvi
5863
*.exe
64+
*.msi
5965
*.dll
6066
*.so
6167
*.mo
@@ -105,3 +111,4 @@ TAGS
105111
*~
106112
common.env
107113
.project
114+
*.orig

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
[submodule "roms/u-boot"]
2626
path = roms/u-boot
2727
url = git://git.qemu-project.org/u-boot.git
28+
[submodule "dtc"]
29+
path = dtc
30+
url = git://git.qemu-project.org/dtc.git
31+
[submodule "pixman"]
32+
path = pixman
33+
url = git://anongit.freedesktop.org/pixman

.travis.yml

Lines changed: 58 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1+
sudo: false
12
language: c
23
python:
34
- "2.4"
45
compiler:
56
- gcc
67
- clang
8+
cache: ccache
9+
addons:
10+
apt:
11+
packages:
12+
- libaio-dev
13+
- libattr1-dev
14+
- libbrlapi-dev
15+
- libcap-ng-dev
16+
- libgnutls-dev
17+
- libgtk-3-dev
18+
- libiscsi-dev
19+
- liblttng-ust-dev
20+
- libncurses5-dev
21+
- libnss3-dev
22+
- libpixman-1-dev
23+
- libpng12-dev
24+
- librados-dev
25+
- libsdl1.2-dev
26+
- libseccomp-dev
27+
- libspice-protocol-dev
28+
- libspice-server-dev
29+
- libssh2-1-dev
30+
- liburcu-dev
31+
- libusb-1.0-0-dev
32+
- libvte-2.90-dev
33+
- sparse
34+
- uuid-dev
35+
736
notifications:
837
irc:
938
channels:
@@ -12,92 +41,50 @@ notifications:
1241
on_failure: always
1342
env:
1443
global:
15-
- TEST_CMD=""
16-
- EXTRA_CONFIG=""
17-
# Development packages, EXTRA_PKGS saved for additional builds
18-
- CORE_PKGS="libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev"
19-
- NET_PKGS="libseccomp-dev libgnutls-dev libssh2-1-dev libspice-server-dev libspice-protocol-dev libnss3-dev"
20-
- GUI_PKGS="libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev"
21-
- EXTRA_PKGS=""
44+
- TEST_CMD="make check"
2245
matrix:
23-
# Group major targets together with their linux-user counterparts
24-
- TARGETS=alpha-softmmu,alpha-linux-user
25-
- TARGETS=arm-softmmu,arm-linux-user,armeb-linux-user,aarch64-softmmu,aarch64-linux-user
26-
- TARGETS=cris-softmmu,cris-linux-user
27-
- TARGETS=i386-softmmu,i386-linux-user,x86_64-softmmu,x86_64-linux-user
28-
- TARGETS=m68k-softmmu,m68k-linux-user
29-
- TARGETS=microblaze-softmmu,microblazeel-softmmu,microblaze-linux-user,microblazeel-linux-user
30-
- TARGETS=mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu
31-
- TARGETS=mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,mipsn32-linux-user,mipsn32el-linux-user
32-
- TARGETS=or32-softmmu,or32-linux-user
33-
- TARGETS=ppc-softmmu,ppc64-softmmu,ppcemb-softmmu,ppc-linux-user,ppc64-linux-user,ppc64abi32-linux-user,ppc64le-linux-user
34-
- TARGETS=s390x-softmmu,s390x-linux-user
35-
- TARGETS=sh4-softmmu,sh4eb-softmmu,sh4-linux-user sh4eb-linux-user
36-
- TARGETS=sparc-softmmu,sparc64-softmmu,sparc-linux-user,sparc32plus-linux-user,sparc64-linux-user
37-
- TARGETS=unicore32-softmmu,unicore32-linux-user
38-
# Group remaining softmmu only targets into one build
39-
- TARGETS=lm32-softmmu,moxie-softmmu,tricore-softmmu,xtensa-softmmu,xtensaeb-softmmu
46+
- CONFIG=""
47+
- CONFIG="--enable-debug --enable-debug-tcg --enable-trace-backends=log"
48+
- CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb"
49+
- CONFIG="--enable-modules"
50+
- CONFIG="--with-coroutine=ucontext"
51+
- CONFIG="--with-coroutine=sigaltstack"
4052
git:
4153
# we want to do this ourselves
4254
submodules: false
4355
before_install:
56+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
57+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi
4458
- wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ
4559
- git submodule update --init --recursive
46-
- sudo apt-get update -qq
47-
- sudo apt-get install -qq ${CORE_PKGS} ${NET_PKGS} ${GUI_PKGS} ${EXTRA_PKGS}
4860
before_script:
49-
- ./configure --target-list=${TARGETS} --enable-debug-tcg ${EXTRA_CONFIG}
61+
- ./configure ${CONFIG}
5062
script:
51-
- make -j2 && ${TEST_CMD}
63+
- make -j3 && ${TEST_CMD}
5264
matrix:
53-
# We manually include a number of additional build for non-standard bits
5465
include:
55-
# Make check target (we only do this once)
56-
- env:
57-
- TARGETS=alpha-softmmu,arm-softmmu,aarch64-softmmu,cris-softmmu,
58-
i386-softmmu,x86_64-softmmu,m68k-softmmu,microblaze-softmmu,
59-
microblazeel-softmmu,mips-softmmu,mips64-softmmu,
60-
mips64el-softmmu,mipsel-softmmu,or32-softmmu,ppc-softmmu,
61-
ppc64-softmmu,ppcemb-softmmu,s390x-softmmu,sh4-softmmu,
62-
sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,
63-
unicore32-softmmu,unicore32-linux-user,
64-
lm32-softmmu,moxie-softmmu,tricore-softmmu,xtensa-softmmu,
65-
xtensaeb-softmmu
66-
TEST_CMD="make check"
66+
# Sparse is GCC only
67+
- env: CONFIG="--enable-sparse"
6768
compiler: gcc
68-
# Debug related options
69-
- env: TARGETS=i386-softmmu,x86_64-softmmu
70-
EXTRA_CONFIG="--enable-debug"
69+
# gprof/gcov are GCC features
70+
- env: CONFIG="--enable-gprof --enable-gcov --disable-pie"
7171
compiler: gcc
72-
- env: TARGETS=i386-softmmu,x86_64-softmmu
73-
EXTRA_CONFIG="--enable-debug --enable-tcg-interpreter"
72+
# We manually include builds which we disable "make check" for
73+
- env: CONFIG="--enable-debug --enable-tcg-interpreter"
74+
TEST_CMD=""
7475
compiler: gcc
75-
# All the extra -dev packages
76-
- env: TARGETS=i386-softmmu,x86_64-softmmu
77-
EXTRA_PKGS="libaio-dev libcap-ng-dev libattr1-dev libbrlapi-dev uuid-dev libusb-1.0.0-dev"
76+
- env: CONFIG="--enable-trace-backends=simple"
77+
TEST_CMD=""
7878
compiler: gcc
79-
# Currently configure doesn't force --disable-pie
80-
- env: TARGETS=i386-softmmu,x86_64-softmmu
81-
EXTRA_CONFIG="--enable-gprof --enable-gcov --disable-pie"
79+
- env: CONFIG="--enable-trace-backends=ftrace"
80+
TEST_CMD=""
8281
compiler: gcc
83-
- env: TARGETS=i386-softmmu,x86_64-softmmu
84-
EXTRA_PKGS="sparse"
85-
EXTRA_CONFIG="--enable-sparse"
82+
- env: CONFIG="--enable-trace-backends=ust"
83+
TEST_CMD=""
8684
compiler: gcc
87-
# All the trace backends (apart from dtrace)
88-
- env: TARGETS=i386-softmmu,x86_64-softmmu
89-
EXTRA_CONFIG="--enable-trace-backends=stderr"
90-
compiler: gcc
91-
- env: TARGETS=i386-softmmu,x86_64-softmmu
92-
EXTRA_CONFIG="--enable-trace-backends=simple"
93-
compiler: gcc
94-
- env: TARGETS=i386-softmmu,x86_64-softmmu
95-
EXTRA_CONFIG="--enable-trace-backends=ftrace"
96-
compiler: gcc
97-
- env: TARGETS=i386-softmmu,x86_64-softmmu
98-
EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
99-
EXTRA_CONFIG="--enable-trace-backends=ust"
100-
compiler: gcc
101-
- env: TARGETS=i386-softmmu,x86_64-softmmu
102-
EXTRA_CONFIG="--enable-modules"
85+
- env: CONFIG="--with-coroutine=gthread"
86+
TEST_CMD=""
10387
compiler: gcc
88+
- env: CONFIG=""
89+
os: osx
90+
compiler: clang

CODING_STYLE

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ Furthermore, it is the QEMU coding style.
8787

8888
5. Declarations
8989

90-
Mixed declarations (interleaving statements and declarations within blocks)
91-
are not allowed; declarations should be at the beginning of blocks. In other
92-
words, the code should not generate warnings if using GCC's
93-
-Wdeclaration-after-statement option.
90+
Mixed declarations (interleaving statements and declarations within
91+
blocks) are generally not allowed; declarations should be at the beginning
92+
of blocks.
93+
94+
Every now and then, an exception is made for declarations inside a
95+
#ifdef or #ifndef block: if the code looks nicer, such declarations can
96+
be placed at the top of the block even if there are statements above.
97+
On the other hand, however, it's often best to move that #ifdef/#ifndef
98+
block to a separate function altogether.
9499

95100
6. Conditional statements
96101

HACKING

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,58 @@ painful. These are:
157157
* you may assume that integers are 2s complement representation
158158
* you may assume that right shift of a signed integer duplicates
159159
the sign bit (ie it is an arithmetic shift, not a logical shift)
160+
161+
7. Error handling and reporting
162+
163+
7.1 Reporting errors to the human user
164+
165+
Do not use printf(), fprintf() or monitor_printf(). Instead, use
166+
error_report() or error_vreport() from error-report.h. This ensures the
167+
error is reported in the right place (current monitor or stderr), and in
168+
a uniform format.
169+
170+
Use error_printf() & friends to print additional information.
171+
172+
error_report() prints the current location. In certain common cases
173+
like command line parsing, the current location is tracked
174+
automatically. To manipulate it manually, use the loc_*() from
175+
error-report.h.
176+
177+
7.2 Propagating errors
178+
179+
An error can't always be reported to the user right where it's detected,
180+
but often needs to be propagated up the call chain to a place that can
181+
handle it. This can be done in various ways.
182+
183+
The most flexible one is Error objects. See error.h for usage
184+
information.
185+
186+
Use the simplest suitable method to communicate success / failure to
187+
callers. Stick to common methods: non-negative on success / -1 on
188+
error, non-negative / -errno, non-null / null, or Error objects.
189+
190+
Example: when a function returns a non-null pointer on success, and it
191+
can fail only in one way (as far as the caller is concerned), returning
192+
null on failure is just fine, and certainly simpler and a lot easier on
193+
the eyes than propagating an Error object through an Error ** parameter.
194+
195+
Example: when a function's callers need to report details on failure
196+
only the function really knows, use Error **, and set suitable errors.
197+
198+
Do not report an error to the user when you're also returning an error
199+
for somebody else to handle. Leave the reporting to the place that
200+
consumes the error returned.
201+
202+
7.3 Handling errors
203+
204+
Calling exit() is fine when handling configuration errors during
205+
startup. It's problematic during normal operation. In particular,
206+
monitor commands should never exit().
207+
208+
Do not call exit() or abort() to handle an error that can be triggered
209+
by the guest (e.g., some unimplemented corner case in guest code
210+
translation or device emulation). Guests should not be able to
211+
terminate QEMU.
212+
213+
Note that &error_fatal is just another way to exit(1), and &error_abort
214+
is just another way to abort().

0 commit comments

Comments
 (0)