graph display question

Srinivas Narayan <[email protected]> Wed, 18 Mar 2020 09:47:36 +0000
Newsgroups gmane.comp.debugging.ddd.general
Message-ID <CALg74=+cp+hbY+WGbNwDry0WUiE-LtnwGKm4GcE8LoZ=L=Piqg@mail.gmail.com>
Hello,



I am trying to use the graph display command to visualize some complex data
structures with dependent nodes. I would like to be able to write a script
that follows all the pointers I need to and use that whenever I need to
dump a specific data structure. However, there does not seem to be any way
to get the display number of a node in order to express a dependency on.

Would it be possible to add this facility?



e.g if I have the following data structure hierarchy



struct x {

   int i;

};



struct y {

   struct x *x_ptr;

};



struct y *y_ptr;



I would like to be able to have a script of the form



graph display y_ptr

..... determine <number>.... corresponding to display of y_ptr

graph display y_ptr->x_ptr dependent on <number>

and so on ...


where <number> can be determined dynamically or better still assigned by
the user.



I understand that is currently just a monotonically increasing number. So
one way of determining the number may be to keep a global value in my
script - but that seems a bit kludgy and doesn't let me maintain a library
of scripts that can be invoked easily.


A separate second query - is it possible to customize the shape of the
edges generated in the graph to make them neat 'L' shapes in order to
generate graphs with minimum overlap?



Thanks

Srinivas