> P.S. -symbol-list-variables does not seem to be a valid GDB command, maybe you meant -stack-list-variables?
> As for -symbol-info-symbol, I can't find anything close to that...
You are right, those commands are wrong, Google had dropped me in the middle of some v5.1.1 GDB/MI documentation and enough things worked for me not to notice.
I’m not sure if there is an elegant way of doing what I want to at all now. -symbol-list-variables returned a list of all the global and static variables, it has been removed and I don’t think there is a replacement that works the same way. I might be able to use –data-read-memory-bytes as that lists is equivalent to x on the CLI which does show the symbols. Unfortunately I’m stuck at GDB 7.2 on our target and this command doesn’t show up until version 7.3.
I suppose I could do it by using the variable object interface but that seems targeted to getting information about an individual variable rather than all the variables in a memory range.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: 27 October 2011 15:28
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] Getting a list of global variables and their addresses
DSF-GDB does not show global variables automatically.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=219040 [variables][cdi] Variables view should show globals (or should it?)
CDI-GDB does show them, so you may want to look into how it does it.
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Phil (Philip) Mason
Sent: Thursday, October 27, 2011 7:46 AM
To: CDT General developers list.
Subject: [cdt-dev] Getting a list of global variables and their addresses
Hello all,
I’m extending the memory views so they have an additional pane which shows which where symbols reside in memory. I only need to do so for the global variables and I can get the information I need from GDB using the MI commands –symbol-list-variables (or –symbol-info-symbol) but I don’t think these are used anywhere in DSF.
Is there currently a recommended way of getting a list of the global variables and their addresses or do I need to start from scratch?
Any suggestions about the best way to proceed would be appreciated.
Thanks in advance
Phil Mason