title: htobe64 function disables debugger's ability to list source code
body: <p>I have compiled the very simple program</p>
  <pre><code>$ cat main.cpp
  #include &lt;iostream&gt;
  int main() {
      uint64_t val=1;
      // val = htobe64(val);
      std::cout &lt;&lt; val &lt;&lt; std::endl;
  }
  $ g++ -g main.cpp -o a.out
  </code></pre>
  <p>When I debug it using cgdb I get the following:</p>
  <pre><code>$ cgdb a.out
  </code></pre>
  <p><a href="https://i.stack.imgur.com/cjGB9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cjGB9.png" alt="CGDB normal" /></a></p>
  <p>But when I uncomment the line <code>// val = htobe64(val)</code> something strange happens:</p>
  <pre><code>$ cat main.cpp
  #include &lt;iostream&gt;
  int main() {
      uint64_t val=1;
      val = htobe64(val);
      std::cout &lt;&lt; val &lt;&lt; std::endl;
  }
  $ g++ -g main.cpp -o a.out
  $ cgdb a.out    
  </code></pre>
  <p><a href="https://i.stack.imgur.com/gYPFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gYPFh.png" alt="CGDB not normal" /></a></p>
  <p>Uncommenting this single line causes cgdb to start showing the splash screen and when I type <code>start</code> as in the screenshot it only gives me assembler code (before cgdb started directly showing the source code and not its splash screen). Furthermore somehow the file path <code>/home/user/byteswap.h</code> appears in the screenshot, but this file does not exist (In this example <code>user</code> is was my username and <code>/home/user</code> my working directory).</p>
  <p><strong>Can someone tell me what is happening here and what I can do to be able to debug a program that is calling <code>htobe64</code>, i.e. how to achieve that cgdb will show me the source code as in the first example at the top?</strong></p>
  <p>Here are the tool versions:</p>
  <pre><code>$ cgdb --version
  CGDB 0.7.1
  Copyright 2002-2019 Bob Rossi and Mike Mueller.
  CGDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  There is absolutely no warranty for CGDB.
  
  $ gdb --version
  GNU gdb (Debian 8.2.1-2+b3) 8.2.1
  Copyright (C) 2018 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  
  $ g++ --version
  g++ (Debian 11.2.0-10) 11.2.0
  Copyright (C) 2021 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  </code></pre>