Instead of creating psuedo source files for each stack frame this change adopts the new DAP “disassemble” request, allowing clients to inspect assembly instructions of files with debug info in addition to files without debug info. [[ https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disassemble | spec ]] See attached screenshot of the disassembly view. {F28473848} Reviewed By: wallace Differential Revision: https://reviews.llvm.org/D156493
30 lines
558 B
C
30 lines
558 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <limits.h>
|
|
|
|
int compare_ints(const void* a, const void* b)
|
|
{
|
|
int arg1 = *(const int*)a;
|
|
int arg2 = *(const int*)b;
|
|
|
|
// breakpoint 1
|
|
|
|
if (arg1 < arg2) return -1;
|
|
if (arg1 > arg2) return 1;
|
|
return 0;
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
int ints[] = { -2, 99, 0, -743, 2, INT_MIN, 4 };
|
|
int size = sizeof ints / sizeof *ints;
|
|
|
|
qsort(ints, size, sizeof(int), compare_ints);
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
printf("%d ", ints[i]);
|
|
}
|
|
|
|
printf("\n");
|
|
return 0;
|
|
} |