You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am trying to parse the graph built by axg outside of r2. It looks like axg* produces output in the exact format that many graph libraries expect (named nodes, and edges between named nodes), which is fantastic! However, while axg and axgj output the exact point in a function where a reference exists, which is necessary to actually do anything practical with the data, axg* erases that information and replaces it with the start address of the function instead, making the output useless for anything beyond trivial function-level tracing.
Describe the solution you'd like
Instead of only creating nodes and edges with function addresses in axg*, it would be convenient and consistent to output the same instruction-level addresses as axg and axgj. If backwards compatibility is a concern, maybe behind a flag like f?
Describe alternatives you've considered
I've tried to solve the original problem through axgj, and even though it wasn't difficult to write the code, axgj seems like it has a bug causing malformed JSON missing large chunks of information to be produced from large graphs. I also started working on a parser for the output of axg, but it required a non-trivial whitespace-sensitive parser to extract information from it, which seemed like it would be a major pain to use. Writing an extension to r2 is the last alternative I considered, but it seemed that it would be more helpful to everybody using r2 who might run into these issues to have something like this available publicly.
Additional context
Development is being done with the latest r2 version from git, as of the time of writing.
The text was updated successfully, but these errors were encountered:
R2 has multiple graph output formats you can see them using ag?.
axg* outputs it using r2 commands, that's a format with very specific purpose and not for consumption by other tools.
For analysis using scripts you should use JSON ouptut. If there are bugs causing it to be malformed then those need to be fixed.
Most instructions reference no more than one address drawing such graph would result in a bunch of spikey balls and would not be much better than displaying the same information in a table "address being referenced" -> "number of times address was referenced". That's likely a reason why axg contains information about function -> address being referenced instead.
What you actually want might be axj command which list all the references. It seems to use the address of instruction referencing things not function since it isn't designed for drawing things.
Is your feature request related to a problem? Please describe.
I am trying to parse the graph built by
axg
outside of r2. It looks likeaxg*
produces output in the exact format that many graph libraries expect (named nodes, and edges between named nodes), which is fantastic! However, whileaxg
andaxgj
output the exact point in a function where a reference exists, which is necessary to actually do anything practical with the data,axg*
erases that information and replaces it with the start address of the function instead, making the output useless for anything beyond trivial function-level tracing.Describe the solution you'd like
Instead of only creating nodes and edges with function addresses in
axg*
, it would be convenient and consistent to output the same instruction-level addresses asaxg
andaxgj
. If backwards compatibility is a concern, maybe behind a flag likef
?Describe alternatives you've considered
I've tried to solve the original problem through
axgj
, and even though it wasn't difficult to write the code,axgj
seems like it has a bug causing malformed JSON missing large chunks of information to be produced from large graphs. I also started working on a parser for the output ofaxg
, but it required a non-trivial whitespace-sensitive parser to extract information from it, which seemed like it would be a major pain to use. Writing an extension to r2 is the last alternative I considered, but it seemed that it would be more helpful to everybody using r2 who might run into these issues to have something like this available publicly.Additional context
Development is being done with the latest r2 version from git, as of the time of writing.
The text was updated successfully, but these errors were encountered: