breakpoints

Is there any way to set a breakpoint in gdb that is conditional on the call stack?

时光毁灭记忆、已成空白 提交于 2019-11-26 22:50:07
I am debugging C++ in gdb 7.1 on Linux. I have a function a() that is called in many places in the code. I want to set a breakpoint in it, but only if it was called from b() . Is there any way to do it? Is there any way to do it only if b() was called from c() , and so on ad infinitum? Update: There is now a better answer to this question: use GDB _is_caller convenience function. The need you describe comes up quite often, usually in the context of some_utility_fn being called a lot, but you only are interested in the call which comes from some_other_fn . You could probably script this entire

Can I set a breakpoint when variable is getting a specific value in .NET?

瘦欲@ 提交于 2019-11-26 22:42:55
问题 I am using Visual Studio 2010, and I know this feature is available in C++. I need to debug some code, that changes a variable to several values. I want to debug the code in a specific case, when the variable getting a specific value. I know I can add if(var == value) , but is there any elegant way to do it? Another question, can I set a breakpoint when a variable is changed in general? 回答1: It is certainly possible to set a condition like a variable receiving a certain value. This is known

Breakpoint Failed to Bind - Visual Studio 2015

家住魔仙堡 提交于 2019-11-26 22:05:02
I just upgraded from Visual Studio 2013 to 2015 and now I am having trouble with breakpoints. It's a hit or a miss where break points will actually work and if I set one while debugging I get the error: The breakpoint failed to bind. Any help would be appreciated. I am about ready to give up on 2015 and go back. I had the same problem but a different solution. Please note I updated to VS 2015 Update 1 and the problem is still there. In previous edition of VS starting debug automatically triggered a build in debug mode. But with VS2015 it does not. So if your last build was in release mode, and

How to set earliest possible breakpoint

会有一股神秘感。 提交于 2019-11-26 21:40:29
问题 I'm trying to stop right after the module is loaded in gdb. Let's assume that the binary is completely stripped out of all symbol informations, so there's no main. Ideally I'd set the breakpoint on the entry point, but that idea breaks down due to relocations: (gdb) info target Symbols from "./application". Local exec file: `./application', file type elf64-x86-64. Entry point: 0xc154 ... (gdb) break *0xc154 Breakpoint 1 at 0xc154 (gdb) r Starting program: ./application Warning: Cannot insert

Bootstrap 3 breakpoints and media queries

假装没事ソ 提交于 2019-11-26 21:14:29
On the Bootstrap 3 media queries documentation it says: We use the following media queries in our Less files to create the key breakpoints in our grid system. Extra small devices (phones, less than 768px): No media query since this is the default in Bootstrap Small devices (tablets, 768px and up): @media (min-width: @screen-sm-min) { ... } Medium devices (desktops, 992px and up): @media (min-width: @screen-md-min) { ... } Large devices (large desktops, 1200px and up): @media (min-width: @screen-lg-min) { ... } Are we supposed to be able to use the @screen-sm , @screen-md , and @screen-lg names

How to set conditional breakpoints in Visual Studio?

爷,独闯天下 提交于 2019-11-26 20:14:26
Is there an easy way to set conditional breakpoints in Visual Studio? If I want to hit a breakpoint only when the value of a variable becomes something, how can I do it? Set a breakpoint as usual. Right click it. Click Condition. When you are using Express edition you can try this: #if DEBUG if( fooVariable == true ) System.Diagnostics.Debugger.Break(); #endif if statement makes sure that in release build breakepoint will not be present. Visual Studio provides lots of options for conditional breakpoints: To set any of these you Set a break point Right Click over the break point, and in the

gdb scripting: execute commands at selected breakpoint

不打扰是莪最后的温柔 提交于 2019-11-26 17:47:48
问题 I'd like to predefine some breakpoints in a gdb script and to invoke some special commands at these breakpoints and afterwards to automatically continue the program execution. So, ideally, I'd like to have a gdb script like the following: b someFunction ... if breakpoint from above reached do: print var1 call someOtherFunction continue done Additionally an unfortunate fact is, that I can't rely on the python interface for using breakpoints, as the gdb version at the server I currently work at

What different breakpoint icons mean in Eclipse?

浪子不回头ぞ 提交于 2019-11-26 17:43:08
问题 When working with breakpoints in Eclipse I sometimes notice that they have different icons / annotations (markers on left sidebar). Sometimes it's just a blue ball, sometimes it has a checkmark on it and sometimes it is crossed. What do all these annotations mean? 回答1: blue ball: regular breakpoint, active (possibly with a hit count set) empty ball (i.e. white): breakpoint has been disabled (remove checkmark in the breakpoint view, or disable in context menu) diagonal line through breakpoint:

Xdebug PhpStorm don't stop breakpoint

回眸只為那壹抹淺笑 提交于 2019-11-26 17:25:10
问题 PHP 7.2 Xdebug 2.7 Apache/2.4.38 PhpStorm 2018.1.4 Mac OS Mojave project locally installed Xdebug helper in Firefox I can not debug the code. The code stops at the first line. When I try to go further or put points, debugging ends and PhpStorm writes "connected" and nothing more. 回答1: You are using PhpStorm 2018.1.x with Xdebug 2.7. Either upgrade PhpStorm to the latest stable 2018.3.x or downgrade Xdebug to 2.6.x The problem is in recently changed XML namespace in Xdebug protocol, as of

What are data breakpoints?

时间秒杀一切 提交于 2019-11-26 14:12:41
问题 I just came to know that there are data breakpoints. I have worked for the last 5 years in C++ using Visual Studio, and I have never used data breakpoints. Can someone throw some light on what data breakpoints are, when to use them and how to use them with VS? As per my understanding we can set a data breakpoint when we want to check for changes to a variable's value. In this case, we can set a data breakpoint with a condition on the variable value. Any other examples? 回答1: Definition: Data