Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you're not sure whether or not your binary is statically linked, you can check it with ldd and see a message like this:</p> <pre><code>% ldd ffmpeg not a dynamic executable </code></pre> <p>Next, make sure that you give gdb the full path to the executable so that you're not accidentally picking up a binary installed elsewhere on the system that happens to be in your PATH.</p> <p>Most likely you're loading the wrong binary. Even <strong>without</strong> using --disable-stripping and --disable-optimizations I can use gdb fine using both <code>step</code> and <code>next</code> commands. You don't need to use --disable-stripping because inside gdb you can use the ffmpeg_g binary (or if you happen to run the ffmpeg binary you can load the symbols from it using <code>file ffmpeg_g</code>).</p> <p>For debugging purposes it is nice to use the --disable-optimizations so that you don't get <code>value optimized out</code> when inspecting variables, but strictly speaking you don't need to use the option to get emacs/gdb to behave... I have no problems stepping through the code when optimizations are used.</p> <p>There is one things to keep in mind, though, when setting breakpoints with gud/gdb inside of Emacs that might lead to confusion: the <code>gud-break</code> command uses only the base part of the filename for setting breakpoints, not the absolute path to it, which in the case of ffmpeg means that if, for example, you set a breakpoint in utils.c it might not work correctly depending on the value of the source code search paths that you have set in gdb because ffmpeg has multiple files named utils.c in different paths (in fact, there are a total of 5 utils.c files, one in each of the lib* subdirectories) . By default the search path is set to $cdir:$cwd, but if you have it set to something like /path/to/ffmpeg:$cdir:$cwd and you try to set a breakpoint in the utils.c of libavformat, it might find the one in libavutil-- in which case if you're lucky it will complain that the line where you want to set a breakpoint does not exist (because the one in libavutil is shorter), or it might set a breakpoint on the line you want, but in the wrong utils.c.</p> <p>This issue with gud/gdb should be considered a bug. When I get a moment I'll submit a patch for gud-break/gud-format-command to fix the problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload