gpt4 book ai didi

ffmpeg - gdb 不会停在即使是微不足道的断点

转载 作者:行者123 更新时间:2023-12-04 23:09:04 25 4
gpt4 key购买 nike

我正在尝试调试 ffplay (调试版本)使用 mingw-w64 编译在 msys2在 Windows 7 64 位上。我尝试使用 gdb 设置断点,它们似乎设置得很好,但程序并没有停止。所以我尝试发出 start ,它又一次没有停止。我尝试在 main 手动设置断点,但它仍然没有停止。我验证了 main找到了,确实如此。这是 session 的一部分。任何解释可能导致这种情况?

(gdb) start
Temporary breakpoint 1 at 0x140013f7c: file C:/Users/bubaruch/Documents/projects/ffmpeg/ffmpeg/ffplay.c, line 3756.
Starting program: C:\Users\bubaruch\Documents\projects\ffmpeg\b2\ffplay_g.exe
[New Thread 7752.0x275c]
ffplay version 2.8.git Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --disable-doc --disable-optimizations
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Simple media player
usage: ffplay [options] input_file

An input file must be specified
Use -h to get full help or, even better, run 'man ffplay'
[Inferior 1 (process 7752) exited with code 01]

(gdb) l main
3748 return 1;
3749 }
3750
3751 /* Called from the main */
3752 int main(int argc, char **argv)
3753 {
3754 int flags;
3755 VideoState *is;
3756 char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
3757

(gdb) b main
Breakpoint 2 at 0x140013f7c: file C:/Users/bubaruch/Documents/projects/ffmpeg/ffmpeg/ffplay.c, line 3756.

(gdb) r
Starting program: C:\Users\bubaruch\Documents\projects\ffmpeg\b2\ffplay_g.exe
[New Thread 15388.0x3278]
ffplay version 2.8.git Copyright (c) 2003-2015 the FFmpeg developers
built with gcc 5.2.0 (Rev4, Built by MSYS2 project)
configuration: --disable-doc --disable-optimizations
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
Simple media player
usage: ffplay [options] input_file

An input file must be specified
Use -h to get full help or, even better, run 'man ffplay'
[Inferior 1 (process 15388) exited with code 01]

最佳答案

来自 docs :

The ‘start’ command does the equivalent of setting a temporary breakpoint at the beginning of the main procedure and then invoking the ‘run’ command.



所以当你设置断点时你已经在 main 里面了。它再也不会到达,因为程序在 main 结束时退出。因此,断点永远不会触发。

我感觉您正试图在 ffmpeg 深处设置备用断点并调试更具体的东西,但这也没有触发。你为什么不问这个问题呢?对它的解释可能非常不同,可能与内联有关。

关于ffmpeg - gdb 不会停在即使是微不足道的断点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33713639/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com