gcode-mirror / xdebugtoolkit

Automatically exported from code.google.com/p/xdebugtoolkit
0 stars 0 forks source link

cg2dot fails on xdebug 2.1.1 generated cachegrind file #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$> cg2dot.py cachegrind.out 
Warning: Can't parse file 'cachegrind.out'
Line no: 1
Line: 'version: 1\n'
Literal: None
Traceback (most recent call last):
  File "/home/jhendric/xdebugtoolkit/cg2dot.py", line 32, in <module>
    tree = XdebugCachegrindTreeBuilder(xdebug_parser).get_tree()
  File "/home/jhendric/xdebugtoolkit/reader.py", line 148, in get_tree
    body_obj = self.parser.get_body()
  File "/home/jhendric/xdebugtoolkit/cgparser.py", line 296, in get_body
    header = self.get_header()
  File "/home/jhendric/xdebugtoolkit/cgparser.py", line 283, in get_header
    raise CgParseError(line_no, line, token)
cgparser.CgParseError: (1, 'version: 1\n', None)

Original issue reported on code.google.com by justin.h...@gmail.com on 16 Jun 2011 at 4:13

Attachments:

GoogleCodeExporter commented 9 years ago
For now, you can use this to fix the format of a file: 
https://gist.github.com/1121334.

It will even replace the negative "line numbers" from an eval()'d or 
create_function()'d function with something positive.

Original comment by steven.m...@gmail.com on 2 Aug 2011 at 10:00

GoogleCodeExporter commented 9 years ago
does not helped :( 

i took attached file from post above and used bash script from git repo and it 
does not help :(  

Original comment by poi...@gmail.com on 5 Nov 2011 at 6:38

GoogleCodeExporter commented 9 years ago
The .fixed file fails with an error on the very last line. The last lines of my 
.fixed file are:

cfn=php::readdir
calls=1 0 0
100 0
cfn=php::preg_match
calls=1 0

Original comment by maurits....@dop.nu on 3 Apr 2012 at 12:39

GoogleCodeExporter commented 9 years ago
Thanks! The fix script worked for me, using xdebug 2.1

Original comment by mardal2...@gmail.com on 10 May 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Confirm this, same error, workaround doesn't work

Original comment by freelanc...@gmail.com on 14 Jan 2013 at 7:38

GoogleCodeExporter commented 9 years ago
I've fixed the issue. Thanks everyone.
Though I decided to move the project to github so feel free to checkout the 
master from there for now:
https://github.com/AlexeyKupershtokh/xdebugtoolkit

Original comment by Alexey.K...@gmail.com on 14 Apr 2013 at 7:28