mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Wed 07 Jun 2017 19:55:32 BST # 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: simpletrace: Improve the error message if event is not declared Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user