syscall emulation: fix DPRINTF arg ordering bug
authorSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 19 Jul 2014 05:05:51 +0000 (22:05 -0700)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 19 Jul 2014 05:05:51 +0000 (22:05 -0700)
commitf5aace8300a7b611c1111452a7cf27ce4c9982f5
treedbf3149ced929bedc35f90eaafba4cfb9dfca528
parent59c8c454ebdb88ca031d7f597e301bbbbdf7617b
syscall emulation: fix DPRINTF arg ordering bug

When we switched getSyscallArg() from explicit arg indices to
the implicit method, some DPRINTF arguments were left as calls
to getSyscallArg(), even though C/C++ doesn't guarantee
anything about the order of invocation of these calls.  As a
result, the args could be printed out in arbitrary orders.

Interestingly, this bug has been around since 2009:
http://repo.gem5.org/gem5/rev/4842482e1bd1
src/sim/syscall_emul.cc