diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-02-02 16:08:28 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-02 16:08:28 +0000 |
commit | 4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7 (patch) | |
tree | 857fc18ea95112a807196ff0af7b9202109aba2c /scripts/simpletrace.py | |
parent | 0b17d809b08e0315430d2e2923dbe4e967ef4f63 (diff) | |
parent | 7f4076c1bb16d0d6f81a085ecc9c9d0b9da74c7d (diff) | |
download | qemu-4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7.zip qemu-4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7.tar.gz qemu-4e9f5244e1945b2852b9ddcd7f023a7d19c9ecd7.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Wed 01 Feb 2017 13:44:32 GMT
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/tracing-pull-request:
trace: clean up trace-events files
qapi: add missing trace_visit_type_enum() call
trace: improve error reporting when parsing simpletrace header
trace: update docs to reflect new code generation approach
trace: switch to modular code generation for sub-directories
trace: move setting of group name into Makefiles
trace: move hw/i386/xen events to correct subdir
trace: move hw/xen events to correct subdir
trace: move hw/block/dataplane events to correct subdir
make: move top level dir to end of include search path
# Conflicts:
# Makefile
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/simpletrace.py')
-rwxr-xr-x | scripts/simpletrace.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 4ca903d..4c99004 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -73,10 +73,14 @@ def read_record(edict, idtoname, fobj): def read_trace_header(fobj): """Read and verify trace file header""" header = read_header(fobj, log_header_fmt) - if header is None or \ - header[0] != header_event_id or \ - header[1] != header_magic: + if header is None: raise ValueError('Not a valid trace file!') + if header[0] != header_event_id: + raise ValueError('Not a valid trace file, header id %d != %d' % + (header[0], header_event_id)) + if header[1] != header_magic: + raise ValueError('Not a valid trace file, header magic %d != %d' % + (header[1], header_magic)) log_version = header[2] if log_version not in [0, 2, 3, 4]: |