Discussion:
LLDB step over command
Masato Asou
2021-05-14 08:02:28 UTC
Permalink
From: ***@abrakadabra.systems
Subject: LLDB step over command
Date: Wed, 12 May 2021 21:58:31 +0300
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".
#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;
}
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
-> 0x43eae9c8ad0 <+0>: movq 0x11c9(%rip), %r11
0x43eae9c8ad7 <+7>: callq 0x43eae9c8a40
0x43eae9c8adc <+12>: jmp 0x43eae9c8a32
0x43eae9c8ae1 <+17>: pushq $0x4
...
How should I deal with this?
I have same problem on my OpenBSD 6.9 release amd64 box. However, next
command of lldb is working fine on my OpenBSD 6.9 current amd64 box.

The lldb has been updated to 11.1.0 on OpenBSD current. Can you update
to current your OpenBSD box by
https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/?
Thanks,
Serge.
--
ASOU Masato

Loading...