breakpoints

GDB - strcmp not working: __strcmp_sse2_unaligned

本秂侑毒 提交于 2021-01-27 10:46:25
问题 I'm unable to create conditional breakpoint in GDB using strcmp: break x if strcmp(str.c_str(), "foo") == 0 Why you ask? Because: print strcmp("hello", "hello") Yield's (int (*)(const char *, const char *)) 0x7ffff76ffe70 <__strcmp_sse2_unaligned> Even when casting it to an integer: print (int)strcmp("hello", "hello") It returns some nonsensical value like -143655312 Here's a less graceful way to "solve" my problem. I can define a function in my own code: int mystrcmp(const char *str1, const

Set breakpoint on specific line using LLDB

核能气质少年 提交于 2021-01-27 07:52:56
问题 I am attempting to set a breakpoint on line 37 of my project in Xcode and I want to set this using LLDB. I know that I can set this breakpoint manually by clicking in the gutter, but I want to gain a better understanding of using LLDB. How would I build off of the statement below? Is that statement even heading in the correct direction? breakpoint set --file 回答1: Reference the documentation here It looks like you can set a breakpoint in a particular file and line by using (lldb) breakpoint

Remove all disabled breakpoints in Visual Studio

扶醉桌前 提交于 2021-01-07 06:58:46
问题 My version is Visual Studio 2019, but this has been a issue for decades for me. I have long debugging sessions by enabling/disabling breakpoints. In a short time, this will result in hundreds of irrelevant disabled breakpoints. The breakpoint window doesn't seem to have an option to remove all disabled breakpoints. It can't even sort on the enabled column so I can manually delete them en masse. I currently shift click my way through the disabled breakpoints in the grid, which kinda sucks

Android studio 4.1 some breakpoint doesnt trigger

时光总嘲笑我的痴心妄想 提交于 2021-01-07 01:19:54
问题 Why doesn't some of my breakpoints trigger? I'm not sure when this issue started, but I now have it in more than one project. I have Android studio 4.1, no newer updates that I can find. I have updated to Gradle 6.5 with classpath 'com.android.tools.build:gradle:4.1.0' And I have tried downgrading to 4.0.2 and also updating Gradle to 6.7 and other variations. All this without any effect. In the two above images I have breakpoints, they are in the same java file. The first one triggers and

Prevent PLT (procedure linkage table) breakpoints in GDB

久未见 提交于 2020-12-28 07:04:32
问题 In recent versions of GDB, setting a breakpoint on a library function call results in multiple actual breakpoints: Call into the procedure linkage table (PLT) The actual function call This means that when the library function is called, we end up going through two breaks each time. In previous GDB versions, only #2 would be created and hence you only get one break. So the question is: can one can create a library function call breakpoint without the corresponding PLT breakpoint? I am aware

Prevent PLT (procedure linkage table) breakpoints in GDB

独自空忆成欢 提交于 2020-12-28 07:01:09
问题 In recent versions of GDB, setting a breakpoint on a library function call results in multiple actual breakpoints: Call into the procedure linkage table (PLT) The actual function call This means that when the library function is called, we end up going through two breaks each time. In previous GDB versions, only #2 would be created and hence you only get one break. So the question is: can one can create a library function call breakpoint without the corresponding PLT breakpoint? I am aware