Make dmtracedump available on windows pc.

Issue Details:
1.
When dmtracedump is executed on windows pc, command failed.
Error message is "ERROR: unable to read xxxxx bytes from trace file".
This is because trace file is opened in text mode.
2.
When dmtracedump outputs html, #0 method's name isn't "(toplevel)" but "(unknown)".
This is because the positions of (toplevel) and (unknown) in method list interchange on windows pc.
3.
Command of generating png file is invalid for windows.
Command example is "dot -Tpng -o 'foo.png' 'foo.dot'".
When it is executed, it failed.
Error message is "Error: dot: can't open foo.dot.".
This is because command prompt of windows can't open file surrounded by single quotation marks.
4.
dmtracedump failed to create temporary dot file on windows.
This is because temporary dot file is created in "/tmp".
"/tmp" doesn't exist on windows.

Solutions:
1.
Open trace file in binary mode.
2.
In order not to exchange the positoin of (toplevel) and (unknown),
we set the id of (toplevel) to -1 and we set the id of (unknown) to -2.
3.
Replace single qutation marks in command of generating png file to double qutation marks.
4.
Create temporary dot file in current directory.

Change-Id: I2503469fb488fe93cb7a0460ea3fef9b0e139d2d
Signed-off-by: odd.programmer <odd.programmer@gmail.com>
1 file changed