Hello
Im on 6.9 release amd64. Switched to clang and lldb since gcc and gdb are not
in base anymore. My problem is during debugging for some functions
command "next/step-over" behaves like "step/step-in".
example code (just for illustration purpose):
#include<stdlib.h>
#include<string.h>
int main()
{
int a = 5, b;
void *p = malloc(sizeof(int));
memcpy(p, (void *)&a, sizeof(int));
b = *(int *)p;
return b;
}
compiled with:
cc -g -Weverything -ansi -pedantic -O0 -o moveint moveint.c
below is the snippet from session where lldb goes into malloc instead of
step over it.
...
-> 7 void *p = malloc(sizeof(int));
^
8 memcpy(p, (void *)&a, sizeof(int));
9 b = *(int *)p;
10 return b;
(lldb) next
Process 18050 stopped
* thread #1, stop reason = step over failed (Could not create return address
breakpoint. Return address (0x43eae9c89bd) permissions not found.)
frame #0: 0x0000043eae9c8ad0 moveint`malloc
moveint`malloc:
-> 0x43eae9c8ad0 <+0>: movq 0x11c9(%rip), %r11
0x43eae9c8ad7 <+7>: callq 0x43eae9c8a40
0x43eae9c8adc <+12>: jmp 0x43eae9c8a32
0x43eae9c8ae1 <+17>: pushq $0x4
...
How should I deal with this?
Thanks,
Serge.