title: How to prevent gdb being slow to start on machine with full disk
body: <p>In a docker container with disk full gdb takes a while starting.
  It takes a <em>very</em> long while starting for large binary &amp; large core dumps.</p>
  
  <p>It is emitting errors like "error: db5 error(28) from dbenv->open: No space left on device". Grepping the internet shows that error is associated with yum/rpm. </p>
  
  <p>I just want a quick backtrace from the core dump initially. </p>
  
  <p>How can I prevent gdb doing whatever initialisation it is doing? (presumably loading debug symbols for shared/linked libraries).</p>
  
  <p>Note that while it is loading / being slow Ctrl-C doesn't work. Ctrl-Z (suspend) does work so you can always suspend and kill the command if it is taking too long.</p>
  
  <pre><code>[root@XXX]# gdb -c core.XXX bin/XXX
  GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
  Copyright (C) 2013 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.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "x86_64-redhat-linux-gnu".
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;...
  Reading symbols from bin/XXX...
  done.
  [New LWP 19938]
  [New LWP 20044]
  .
  .
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages index using db5 - No space left on device (28)
  error: cannot open Packages database in 
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  Missing separate debuginfo for /lib64/libm.so.6
  Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/72/1c7cc9488efa25f83b48af713ab27dbe48ef3e.debug
  error: db5 error(28) from dbenv-&gt;open: No space left on device
  error: cannot open Packages database in 
  .
  .
  </code></pre>
  
  <p>Possibly related but . . .<br>
  <a href="https://stackoverflow.com/questions/5676241/tell-gdb-to-skip-standard-files">Tell gdb to skip standard files</a></p>