title: Is there a way to get string literals from GCC?
body: <p>I have been looking around for a while on google but no fruitful results. I am actually looking for a way to export or some how get list of all string literals e.g.</p>
  
  <pre><code>int main(){
      const char *p = "Hello";
      const char x[] = "World";
  }
  </code></pre>
  
  <p>For compiling this code is there a way to know "Hello" and "World"?  I do know that they are available in disassemblers (used some in Windows). But is there some proper tool to actually dump these strings or somehow export them? </p>