title: How to understand the '0' argument value for a dict path and print its value in gdb?
body: <p>A void pointer is defined as:</p>
  <pre><code>typedef void* TRIEHANDLE;
  </code></pre>
  <p>Then here is a variable definition:</p>
  <pre><code>TRIEHANDLE m_dictHandle;
  </code></pre>
  <p>Then there is a function defunition:</p>
  <pre><code>int initTrieHandle(TRIEHANDLE &amp;handle, const char *dicPath = 0);
  </code></pre>
  <p>The function is called in an initialization code:</p>
  <pre><code>initTrieHandle(m_dictHandle,0);
  </code></pre>
  <p>I  don't have access to  the source code of initTrieHandle's implementation, but the code is compiled and runs fine. I think this function loads a dictionary into a trie data stru cture, and I want to see what is the file path name of the dictionary. But why is the 2nd argument of it is '0'? How can I print out the dictPath in gdb?
  When I tried to print out the value of m_dictHandle , it says:</p>
  <pre><code>Attempt to dereference a generic pointer.
  </code></pre>
  <p>What I really  want is to find out what is the  dictionary path, but I don't understand why it can be '0'? Maybe the real path name is embedded in the implementation of the function which is invisible to me?</p>
  <p>Add more info below:</p>
  <pre><code>(gdb) disass initTrieHandle
  Dump of assembler code for function initTrieHandle:
     0x000000000082fae0 &lt;+0&gt;: mov    %rbx,-0x10(%rsp)
     0x000000000082fae5 &lt;+5&gt;: mov    %rbp,-0x8(%rsp)
     0x000000000082faea &lt;+10&gt;:    sub    $0x28,%rsp
     0x000000000082faee &lt;+14&gt;:    test   %rsi,%rsi
     0x000000000082faf1 &lt;+17&gt;:    mov    %rdi,%rbx
     0x000000000082faf4 &lt;+20&gt;:    mov    %rsi,%rbp
     0x000000000082faf7 &lt;+23&gt;:    je     0x82fb30 &lt;initTrieHandle+80&gt;
     0x000000000082faf9 &lt;+25&gt;:    mov    $0x4,%esi
     0x000000000082fafe &lt;+30&gt;:    mov    %rbp,%rdi
     0x000000000082fb01 &lt;+33&gt;:    callq  0x40b100 &lt;access@plt&gt;
     0x000000000082fb06 &lt;+38&gt;:    test   %eax,%eax
     0x000000000082fb08 &lt;+40&gt;:    js     0x82fb30 &lt;initTrieHandle+80&gt;
     0x000000000082fb0a &lt;+42&gt;:    mov    %rbp,%rdi
     0x000000000082fb0d &lt;+45&gt;:    callq  0x8313a0 &lt;trie_new_from_file&gt;
     0x000000000082fb12 &lt;+50&gt;:    test   %rax,%rax
     0x000000000082fb15 &lt;+53&gt;:    je     0x82fb66 &lt;initTrieHandle+134&gt;
     0x000000000082fb17 &lt;+55&gt;:    mov    %rax,(%rbx)
     0x000000000082fb1a &lt;+58&gt;:    mov    0x20(%rsp),%rbp
     0x000000000082fb1f &lt;+63&gt;:    xor    %eax,%eax
     0x000000000082fb21 &lt;+65&gt;:    mov    0x18(%rsp),%rbx
     0x000000000082fb26 &lt;+70&gt;:    add    $0x28,%rsp
     0x000000000082fb2a &lt;+74&gt;:    retq   
     0x000000000082fb2b &lt;+75&gt;:    nopl   0x0(%rax,%rax,1)
     0x000000000082fb30 &lt;+80&gt;:    callq  0x831670 &lt;alpha_map_new&gt;
     0x000000000082fb35 &lt;+85&gt;:    xor    %esi,%esi
     0x000000000082fb37 &lt;+87&gt;:    mov    %rax,%rbp
     0x000000000082fb3a &lt;+90&gt;:    mov    $0xff,%edx
     0x000000000082fb3f &lt;+95&gt;:    mov    %rax,%rdi
     0x000000000082fb42 &lt;+98&gt;:    callq  0x8316d0 &lt;alpha_map_add_range&gt;
     0x000000000082fb47 &lt;+103&gt;:   mov    %rbp,%rdi
     0x000000000082fb4a &lt;+106&gt;:   callq  0x8313f0 &lt;trie_new&gt;
     0x000000000082fb4f &lt;+111&gt;:   mov    %rbp,%rdi
     0x000000000082fb52 &lt;+114&gt;:   mov    %rax,0x8(%rsp)
     0x000000000082fb57 &lt;+119&gt;:   callq  0x831690 &lt;alpha_map_free&gt;
     0x000000000082fb5c &lt;+124&gt;:   mov    0x8(%rsp),%rax
     0x000000000082fb61 &lt;+129&gt;:   test   %rax,%rax
     0x000000000082fb64 &lt;+132&gt;:   jne    0x82fb17 &lt;initTrieHandle+55&gt;
     0x000000000082fb66 &lt;+134&gt;:   mov    $0x1,%eax
     0x000000000082fb6b &lt;+139&gt;:   mov    0x18(%rsp),%rbx
     0x000000000082fb70 &lt;+144&gt;:   mov    0x20(%rsp),%rbp
     0x000000000082fb75 &lt;+149&gt;:   add    $0x28,%rsp
     0x000000000082fb79 &lt;+153&gt;:   retq   
  End of assembler dump.
  </code></pre>