Displaying the array of structs ? #243
Replies: 3 comments 2 replies
-
Hi! First, thanks for trying out Seer. Please keep comments and suggestions coming. :^) Appologies for taking some time to get back to you. I was making sure I understood your comments. I think I do now.
The short answer is no. At least not as Seer stands. (Have you seen other debuggers with the capability? If so, which one?) In your example, you have a struct with an X, Y, and Z value. The ArrayVisualizer is really for a single array or two arrays. As the moment, it doesn't handle a third array. And I realize there's no way to "skip" the third array. For example, if you wanted to plot the X and Y points as a line, there's no way to skip the Z value. Thus, that image looks bad. So I need some improvements.
Yes, this is a crux. Your example is a simple structure. We also are lucky in that the values in the structure are contigious and have no "padding" between them. In a more complex example, what we did wouldn't actually work. Another person has brought up the same issue. I did some playing around. As it turns out, the underlying gdb supports something like
Or something like that.
So, sorry, not at the moment. But I'm willing to work on it. Let me know what your thoughts are. I'm curious if you've seen other debuggers with the feature. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Yeah, never thought of using the logger that way. I'm mildly surprised it does something mostly right. The Logger and Tracker should be identical output. I'll consider this a bug that the Tracker doesn't look like the Logger. Also, I think it's another bug that the "Name" column has a value of "{x". That's not right either. |
Beta Was this translation helpful? Give feedback.
-
Overall, I think I know what you're asking for. I'll mull some things over. I'll reply (in time) with my game plan and you can comment on it. Many thanks for your input! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I see, there is a way to display the array made up with primitive data (Array Visualizer),
and also a way to display the fields of specific struct (Struct Visualizer),
but is it possible to display an array of structs ??
(note: this might be related to this feature request #142 )
For example, given the following C code with the breakpoint at
return
statement:I can try to display the values of
arr.data
with Array Visualizer, but without recognizing the members ofstruct CoordsData
(x, y, z), like so:or maybe even seperate 1-2 members by messing with offset and stride:
But this is still very slow to do and only possible in simple cases like this one.
Imagine that one must display something more complex.
Is there any way to do that right now?
Beta Was this translation helpful? Give feedback.
All reactions