debugging

How does adding a run-time breakpoint in Visual Studio work?

醉酒当歌 提交于 2019-12-30 00:42:09
问题 When I add a breakpoint to some C# code during run-time, it gets hit. How does this actually happen? I want to say that when running in debug mode, Visual Studio has references for code blocks, and when a breakpoint is added during run-time, it would be activated once that reference is called in the compiled code. Is that a correct assumption? If so, can you please provide more details about how that works? 回答1: This is actually a rather large and complicated topic, and it is also

Why does this code enable me to detect a debugger?

你。 提交于 2019-12-29 18:45:09
问题 Why the following assembly code is an anti-debugging tool? l1: call l3 l2: ;some code l3: mov al, 0c3h mov edi, offset l3 or ecx, -1 rep stosb I know that C3h is RETN and I know that stobs writes the value in al as opcode according to the offset in edi and it is done for ecx times because of rep . I am also aware the fact that stobs and stosw will run if they were pre-fetched on intel architecture as their original format. If we run the program in debugged mode the pre-fetch is irrelevant and

Auto-skip STL functions during step-by-step debugging in MSVC++2010

有些话、适合烂在心里 提交于 2019-12-29 18:42:12
问题 It often happens that I debug through a program step-by-step. I generally always use the "step into" button to halt at every line in the section that I am debugging, and when I think I got the current line, just click again. What's really disrupting this work flow, however, are library calls. If there's something like a string length calculation or a map storage or similar, the debugger will jump into some STL file and continue there. I then have to press "jump out" to skip back into the

How do I force a program to appear to run out of memory?

只愿长相守 提交于 2019-12-29 16:28:14
问题 I have a C/C++ program that might be hanging when it runs out of memory. We discovered this by running many copies at the same time. I want to debug the program without completely destroying performance on the development machine. Is there a way to limit the memory available so that a new or malloc will return a NULL pointer after, say, 500K of memory has been requested? 回答1: Try turning the question on its head and asking how to limit the amount of memory an OS will allow your process to use

How do I force a program to appear to run out of memory?

我怕爱的太早我们不能终老 提交于 2019-12-29 16:26:10
问题 I have a C/C++ program that might be hanging when it runs out of memory. We discovered this by running many copies at the same time. I want to debug the program without completely destroying performance on the development machine. Is there a way to limit the memory available so that a new or malloc will return a NULL pointer after, say, 500K of memory has been requested? 回答1: Try turning the question on its head and asking how to limit the amount of memory an OS will allow your process to use

Is there a way to step in to CasperJS code and Debug step by step [closed]

谁说我不能喝 提交于 2019-12-29 14:20:24
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Though I have been using CasperJS for some time, and rely on console logging for debugging. I was wondering if there is any IDE which support CasperJS step by step debugging or there is other way(remote debugging) to step in to CasperJS code? Has anybody successfully done it? Any

How to get the symbol name for a memory address in GDB?

删除回忆录丶 提交于 2019-12-29 10:27:08
问题 For instance, I know that 0x46767f0 belongs to an NSString*, is there any way I can find out what NSString it is to help me find some bugs I'm after? 回答1: I believe you're looking for: info symbol <addresss> Print the name of a symbol which is stored at the address addr. If no symbol is stored exactly at addr, GDB prints the nearest symbol and an offset from it. Example: (gdb) info symbol 0x400225 _start + 5 in section .text of /tmp/a.out (gdb) info symbol 0x2aaaac2811cf __read_nocancel + 6

Using MLE function to estimate the parameters of a custom distribution

房东的猫 提交于 2019-12-29 09:05:25
问题 I am trying to use mle() function in MATLAB to estimate the parameters of a 6-parameter custom distribution. The PDF of the custom distribution is and the CDF is where Γ (x,y) and Γ (x) are the upper incomplete gamma function and the gamma function , respectively. α , θ , β , a , b , and c are the parameters of the custom distribution. K is given by Given a data vector ' data ', I want to estimate the parameters α , θ , β , a, b, and c. So, far I have come up with this code: data = rand(20000

Error without an error being thrown

雨燕双飞 提交于 2019-12-29 09:03:15
问题 I'm trying to multiply impute some data, and it's failing in a very odd way. I have options(error=recover) set, and mi() doesn't throw an error, but it does stop imputing after the first attempt. It also doesn't return a value. consequently I have no idea where to even start with debugging. minimal reproducible example below. > library(mi) > temp <- mi(dat) Beginning Multiple Imputation ( Wed Dec 14 10:44:44 2011 ): Iteration 1 Chain 1 : HLTHA5.fac* BMI* INCOME* > temp Error: object 'temp'

Why is only 1 of 4 boxes droppable, if they are all supposed to be?

与世无争的帅哥 提交于 2019-12-29 09:02:22
问题 At my sandbox site, if you load it a drop down menu appears after a few seconds with "confirm" button. If you click that "confirm" button, the background image changes and some new boxes load. The four small boxes on the newly loaded page are draggable, and the 4 boxes inside the white box are supposed to be droppable, but only one is. New Update- Here is a working fiddle of the whole code . Click "submit" on the fiddle. After the new boxes load and they are all draggable and droppable.