Files
clang-p2996/lldb/test/API/macosx/stack-corefile/main.c
Jason Molenda 8c31efeed6 Add the ability to process save-core stack-memory-only corefiles
Add a field to the qMemoryRegionInfo packet where the remote stub
can describe the type of memory -- heap, stack.  Keep track of
memory regions that are stack memory in lldb.  Add a new "--style
stack" to process save-core to request that only stack memory be
included in the corefile.

Differential Revision: https://reviews.llvm.org/D107625
2021-08-11 13:37:31 -07:00

16 lines
332 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int stack_int = 5;
int *heap_int = (int*) malloc(sizeof (int));
*heap_int = 10;
char stack_str[80];
strcpy (stack_str, "stack string");
char *heap_str = (char*) malloc(80);
strcpy (heap_str, "heap string");
return stack_int; // break here;
}