Skip to content

Conversation

freelancevence
Copy link

First commit to support the global variables, which has been slightly tested with "C", but
not with "C++" :

  • global variables panel is opened with [ctrl+f9], when focus is on a source file
  • when selecting a global variable from the list, it is added to the GDB View "Variable"
  • The list of global variables is set with the results of gdb command "info variables".
    In case structure/enum (without typedef), the overall structure is present in the panel list.
  • The list of global variables is persistent so that they are set in GDB View "Variable" at the first stop
    of next launch.

TODO list:

  • Invalid the saved global variables list in case of rebuild/etc....
  • Filter the content of structure/enum when setting the panel list.
  • bugs.

The first version does not work perfectly, but it is good enough to be used.

First commit to support the global variables,
which has been slightly tested with "C", but
not with "C++" :
   - global variables panel is opened with
     [ctrl+f9], when focus is on a source file
   - When selecting a global variable from the list,
     it is added to the GDB View "Variable"
   - The list of global variables is set with the
     results of gdb command "info variables".
     In case structure/enum (without typedef), the overall
     structure is present in the panel list.
   - The list of global variables is persistent so that
     they are set in GDB View "Variable" at the first stop
     of next launch.

TODO list:
   - Invalid the saved global variables list in case
     of rebuild/etc....
   - Filter the content of structure/enum when setting
     the panel list.
   - bugs.

The first version does not work perfectly, but
it is good enough to be used.
@cwillforeal
Copy link

Hey I made some minor additions that I needed to get global arrays to work for me and wouldn't mind merging them into this pull request.

@freelancevence
Copy link
Author

Hi Cwillforeal,
Thanks for your post.
Would it possible that you attach a file .patch of your modifications in a post, so that I commit it in the current pull request ?

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

Successfully merging this pull request may close these issues.

3 participants