title: Getting all global variables from compiled file (linux). How to separate static from const?
body: <p>So, I have something really strange here.</p>
  
  <p>For example I have 2 .cpp files, one of them containing</p>
  
  <pre><code>const std::string DICTIONARY_DEFAULT = "blah";
  const std::string ADDTODICTIONARY_DEFAULT = "blah";
  const std::string BUTTONS = "blah";
  </code></pre>
  
  <p>and the second one with</p>
  
  <pre><code>static int  x1;
  static int  NewY1, NewY2, NewX1, NewX2;
  </code></pre>
  
  <p>Both fragments are in the global variables section.
  I need to print the global static variables (for example), but ignore constants. In <code>nm</code> output they're looking absolutely identical (b-type for every case, which means uninitialized local scope symbol). Is there any way to separate this cases automatically using only linux utilities (grep, regexps and so on are perfectly okay)?</p>