Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to return json depicting symbol relationships #3

Open
jpuzz0 opened this issue Aug 8, 2023 · 1 comment
Open

Ability to return json depicting symbol relationships #3

jpuzz0 opened this issue Aug 8, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jpuzz0
Copy link

jpuzz0 commented Aug 8, 2023

The dot_parser sample in this repo is as follows:

digraph G {
  rankdir="LR"
  "__x64_sys_getpid"->"__task_pid_nr_ns" 
  "__task_pid_nr_ns"->"__rcu_read_lock" 
  "__task_pid_nr_ns"->"__rcu_read_unlock" 
}

When consuming data in a javascript application, it would be useful to be able to retrieve in json format, specifically as a dictionary like the following:

{
  "__x64_sys_getpid": ["__task_pid_nr_ns"],
  "__task_pid_nr_ns": ["__rcu_read_lock", "__rcu_read_unlock" ]
}

Where if a symbol has no target symbols, its value would be an empty array.

@alessandrocarminati alessandrocarminati added the enhancement New feature or request label Aug 10, 2023
@alessandrocarminati alessandrocarminati self-assigned this Aug 10, 2023
@jpuzz0
Copy link
Author

jpuzz0 commented Aug 28, 2023

Alternatively, we could have something like the following to avoid having empty arrays assigned to keys:

Alternative 1

[
  { name: "test1" },
  { name: "test2" },
  { name: "test3" },
  { name: "test4", targets: ["test1", "test2"] },
  { name: "test5", targets: ["test3"] },
]

or

Alternative 2

[
  "test1",
  "test2",
  "test3",
  { name: "test4", targets: ["test1", "test2"] },
  { name: "test5", targets: ["test3"] })
]

Any of these formats would work for the frontend.

For what it's worth, of all 3 proposed solutions, I think Alternative 1 is what I'd prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants