I am trying to mock a function (for unit testing parent function) using GDB. One way to do it would be to set a break point in function you intend to mock and use GDB return command.
I have a C program that (for good reason) allocates memory, copies some code to it, uses mprotect() to give it execute privileges, and then calls that code.
Can anyone tell me what\'s the difference between break and tbreak regarding watchpoints ? A have a simple test code :
I would like to be able to set breakpoints to every method of a C++ class in gdb. I think the easiest way to do this is probably python, since now python has complete access to gdb.I know very little
So I have this executable, compiled with the -g options, that triggers loads of unaligned userspace access warnings.
I found it\'s very annoying to get the开发者_开发问答 program name when defining a GDB script. I can\'t find any corresponding \"info\" command, and we can\'t use argv[0] either, because of multi-proc
I\'m debugging this code : len = NGX_SYS_NERR * sizeof(ngx_str_t); ngx_sys_errlist = malloc(len); if (ngx_sys_errlist == NULL) {
This question already has answers here: Closed 11 years ago. Possible Duplicate: Can 开发者_开发问答I set a breakpoint on 'memory access' in GDB?
How would I get all stack traces for all threads in GDB? I need to figure out where my program hangs up and whether an external framework is causing it. I need 开发者_JAVA技巧something like the backt
I have an array that I am constantly modifying. After my program is finished executing my modifications don\'t quite do what I want them to do, so my array doesn\'t turn out the way that I want. I hav