gpt4 book ai didi

gdb - 如何中断与模式匹配的所有函数?

转载 作者:行者123 更新时间:2023-12-02 06:19:51 24 4
gpt4 key购买 nike

我试图中断所有 pthread 函数,但看起来 gdb 不支持通配符:

(gdb) b pthread_*
Function "pthread_*" not defined.

有什么想法吗?

最佳答案

使用rbreak ^pthread_

来自GDB: Setting Breakpoints :

rbreak regex

Set breakpoints on all functions matching the regular expression regex.

The syntax of the regular expression is the standard one used with tools like grep. Note that this is different from the syntax used by shells, so for instance foo* matches all functions that include an fo followed by zero or more os. There is an implicit .* leading and trailing the regular expression you supply, so to match only functions that begin with foo, use ^foo.

关于gdb - 如何中断与模式匹配的所有函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24614062/

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