Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-requ…
Browse files Browse the repository at this point in the history
…est' into staging

# gpg: Signature made Wed 07 Jun 2017 19:55:32 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <[email protected]>"
# gpg:                 aka "Stefan Hajnoczi <[email protected]>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  simpletrace: Improve the error message if event is not declared

Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
pm215 committed Jun 12, 2017
2 parents 2a8469a + 249e9f7 commit 5093f02
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/simpletrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ def get_record(edict, idtoname, rechdr, fobj):
event_id = rechdr[0]
name = idtoname[event_id]
rec = (name, rechdr[1], rechdr[3])
event = edict[name]
try:
event = edict[name]
except KeyError, e:
import sys
sys.stderr.write('%s event is logged but is not declared ' \
'in the trace events file, try using ' \
'trace-events-all instead.\n' % str(e))
sys.exit(1)

for type, name in event.args:
if is_string(type):
l = fobj.read(4)
Expand Down

0 comments on commit 5093f02

Please sign in to comment.