[Lldb-commits] [lldb] [lldb] Rename lldb-vscode to lldb-dap (PR #69264)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 16 16:18:04 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff b225934a4b0d2944958a53269665b00e7eae4875 92130a4fe2499a962e54d2628947ed1798ff8dc2 -- lldb/test/API/tools/lldb-dap/attach/main.c lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp lldb/test/API/tools/lldb-dap/breakpoint-events/foo.h lldb/test/API/tools/lldb-dap/breakpoint-events/main.cpp lldb/test/API/tools/lldb-dap/breakpoint/main.cpp lldb/test/API/tools/lldb-dap/breakpoint/other.c lldb/test/API/tools/lldb-dap/completions/main.cpp lldb/test/API/tools/lldb-dap/console/main.cpp lldb/test/API/tools/lldb-dap/coreFile/main.c lldb/test/API/tools/lldb-dap/correct-thread/main.c lldb/test/API/tools/lldb-dap/disassemble/main.c lldb/test/API/tools/lldb-dap/disconnect/main.cpp lldb/test/API/tools/lldb-dap/evaluate/foo.cpp lldb/test/API/tools/lldb-dap/evaluate/foo.h lldb/test/API/tools/lldb-dap/evaluate/main.cpp lldb/test/API/tools/lldb-dap/exception/main.cpp lldb/test/API/tools/lldb-dap/launch/main.c lldb/test/API/tools/lldb-dap/module/foo.cpp lldb/test/API/tools/lldb-dap/module/foo.h lldb/test/API/tools/lldb-dap/module/main.cpp lldb/test/API/tools/lldb-dap/optimized/main.cpp lldb/test/API/tools/lldb-dap/restart/main.c lldb/test/API/tools/lldb-dap/runInTerminal/main.c lldb/test/API/tools/lldb-dap/stackTrace/main.c lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/main.cpp lldb/test/API/tools/lldb-dap/startDebugging/main.c lldb/test/API/tools/lldb-dap/step/main.cpp lldb/test/API/tools/lldb-dap/stop-hooks/main.c lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp lldb/test/API/tools/lldb-dap/terminated-event/foo.h lldb/test/API/tools/lldb-dap/terminated-event/main.cpp lldb/test/API/tools/lldb-dap/variables/main.cpp lldb/tools/lldb-dap/BreakpointBase.cpp lldb/tools/lldb-dap/BreakpointBase.h lldb/tools/lldb-dap/DAP.cpp lldb/tools/lldb-dap/DAP.h lldb/tools/lldb-dap/DAPForward.h lldb/tools/lldb-dap/ExceptionBreakpoint.cpp lldb/tools/lldb-dap/ExceptionBreakpoint.h lldb/tools/lldb-dap/FifoFiles.cpp lldb/tools/lldb-dap/FifoFiles.h lldb/tools/lldb-dap/FunctionBreakpoint.cpp lldb/tools/lldb-dap/FunctionBreakpoint.h lldb/tools/lldb-dap/IOStream.cpp lldb/tools/lldb-dap/IOStream.h lldb/tools/lldb-dap/JSONUtils.cpp lldb/tools/lldb-dap/JSONUtils.h lldb/tools/lldb-dap/LLDBUtils.cpp lldb/tools/lldb-dap/LLDBUtils.h lldb/tools/lldb-dap/OutputRedirector.cpp lldb/tools/lldb-dap/OutputRedirector.h lldb/tools/lldb-dap/ProgressEvent.cpp lldb/tools/lldb-dap/ProgressEvent.h lldb/tools/lldb-dap/RunInTerminal.cpp lldb/tools/lldb-dap/RunInTerminal.h lldb/tools/lldb-dap/SourceBreakpoint.cpp lldb/tools/lldb-dap/SourceBreakpoint.h lldb/tools/lldb-dap/lldb-dap.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp b/lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp
index fa4f5657e69b..7a4f90d7dd58 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp
+++ b/lldb/test/API/tools/lldb-dap/breakpoint-events/foo.cpp
@@ -7,5 +7,5 @@ static void unique_function_name() {
int foo(int x) {
// foo breakpoint 1
unique_function_name();
- return x+42;
+ return x + 42;
}
diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/main.cpp b/lldb/test/API/tools/lldb-dap/breakpoint/main.cpp
index d4e0ac26dd11..935a63fab6d0 100644
--- a/lldb/test/API/tools/lldb-dap/breakpoint/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/breakpoint/main.cpp
@@ -11,10 +11,10 @@ int thirteen(int i) {
}
namespace a {
- int fourteen(int i) {
- return 14 + i; // break 14
- }
+int fourteen(int i) {
+ return 14 + i; // break 14
}
+} // namespace a
int main(int argc, char const *argv[]) {
#if defined(__APPLE__)
const char *libother_name = "libother.dylib";
@@ -35,11 +35,11 @@ int main(int argc, char const *argv[]) {
}
foo(12); // before loop
- for (int i=0; i<10; ++i) {
+ for (int i = 0; i < 10; ++i) {
int x = twelve(i) + thirteen(i) + a::fourteen(i); // break loop
}
try {
- throw std::invalid_argument( "throwing exception for testing" );
+ throw std::invalid_argument("throwing exception for testing");
} catch (...) {
puts("caught exception...");
}
diff --git a/lldb/test/API/tools/lldb-dap/completions/main.cpp b/lldb/test/API/tools/lldb-dap/completions/main.cpp
index dccf43ff6feb..4314067cfe95 100644
--- a/lldb/test/API/tools/lldb-dap/completions/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/completions/main.cpp
@@ -7,9 +7,9 @@ struct bar {
struct foo {
int var1;
- bar* my_bar_pointer;
+ bar *my_bar_pointer;
bar my_bar_object;
- foo* next_foo;
+ foo *next_foo;
};
struct baz {
@@ -28,7 +28,7 @@ int main(int argc, char const *argv[]) {
std::vector<baz> vec;
fun(vec);
bar bar1 = {2};
- bar* bar2 = &bar1;
- foo foo1 = {3,&bar1, bar1, NULL};
+ bar *bar2 = &bar1;
+ foo foo1 = {3, &bar1, bar1, NULL};
return 0; // breakpoint 2
}
diff --git a/lldb/test/API/tools/lldb-dap/correct-thread/main.c b/lldb/test/API/tools/lldb-dap/correct-thread/main.c
index 157c3f994db1..3eeb1ef02cb8 100644
--- a/lldb/test/API/tools/lldb-dap/correct-thread/main.c
+++ b/lldb/test/API/tools/lldb-dap/correct-thread/main.c
@@ -3,14 +3,12 @@
int state_var;
-void *thread (void *in)
-{
+void *thread(void *in) {
state_var++; // break here
return NULL;
}
-int main(int argc, char **argv)
-{
+int main(int argc, char **argv) {
pthread_t t1, t2;
pthread_create(&t1, NULL, *thread, NULL);
diff --git a/lldb/test/API/tools/lldb-dap/disassemble/main.c b/lldb/test/API/tools/lldb-dap/disassemble/main.c
index 8dd32f263c28..6609a4c37a70 100644
--- a/lldb/test/API/tools/lldb-dap/disassemble/main.c
+++ b/lldb/test/API/tools/lldb-dap/disassemble/main.c
@@ -1,30 +1,30 @@
+#include <limits.h>
#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 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;
+
+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;
}
\ No newline at end of file
diff --git a/lldb/test/API/tools/lldb-dap/evaluate/main.cpp b/lldb/test/API/tools/lldb-dap/evaluate/main.cpp
index f09d00e6444b..ca27b5ba5ca1 100644
--- a/lldb/test/API/tools/lldb-dap/evaluate/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/evaluate/main.cpp
@@ -1,7 +1,7 @@
#include "foo.h"
-#include <vector>
#include <map>
+#include <vector>
static int static_int = 42;
@@ -43,7 +43,7 @@ int main(int argc, char const *argv[]) {
std::vector<bool> my_bool_vec;
my_bool_vec.push_back(true);
my_bool_vec.push_back(false); // breakpoint 6
- my_bool_vec.push_back(true); // breakpoint 7
+ my_bool_vec.push_back(true); // breakpoint 7
return 0;
}
diff --git a/lldb/test/API/tools/lldb-dap/launch/main.c b/lldb/test/API/tools/lldb-dap/launch/main.c
index aed2af9828f3..01e209ac12c6 100644
--- a/lldb/test/API/tools/lldb-dap/launch/main.c
+++ b/lldb/test/API/tools/lldb-dap/launch/main.c
@@ -3,13 +3,13 @@
#include <unistd.h>
int main(int argc, char const *argv[], char const *envp[]) {
- for (int i=0; i<argc; ++i)
+ for (int i = 0; i < argc; ++i)
printf("arg[%i] = \"%s\"\n", i, argv[i]);
- for (int i=0; envp[i]; ++i)
+ for (int i = 0; envp[i]; ++i)
printf("env[%i] = \"%s\"\n", i, envp[i]);
char *cwd = getcwd(NULL, 0);
printf("cwd = \"%s\"\n", cwd); // breakpoint 1
free(cwd);
cwd = NULL;
- return 0; // breakpoint 2
+ return 0; // breakpoint 2
}
diff --git a/lldb/test/API/tools/lldb-dap/module/foo.cpp b/lldb/test/API/tools/lldb-dap/module/foo.cpp
index 9dba85a9ccca..b6f33b8e070a 100644
--- a/lldb/test/API/tools/lldb-dap/module/foo.cpp
+++ b/lldb/test/API/tools/lldb-dap/module/foo.cpp
@@ -1,3 +1 @@
-int foo() {
- return 12;
-}
+int foo() { return 12; }
diff --git a/lldb/test/API/tools/lldb-dap/restart/main.c b/lldb/test/API/tools/lldb-dap/restart/main.c
index 710af8e97502..b02928a694c9 100644
--- a/lldb/test/API/tools/lldb-dap/restart/main.c
+++ b/lldb/test/API/tools/lldb-dap/restart/main.c
@@ -5,5 +5,5 @@ int main(int argc, char const *argv[], char const *envp[]) {
printf("Do something\n"); // breakpoint A
printf("Do something else\n");
i = 1234;
- return 0; // breakpoint B
+ return 0; // breakpoint B
}
diff --git a/lldb/test/API/tools/lldb-dap/stackTrace/main.c b/lldb/test/API/tools/lldb-dap/stackTrace/main.c
index 85b41c492817..862473a3e6ac 100644
--- a/lldb/test/API/tools/lldb-dap/stackTrace/main.c
+++ b/lldb/test/API/tools/lldb-dap/stackTrace/main.c
@@ -3,8 +3,8 @@
int recurse(int x) {
if (x <= 1)
- return 1; // recurse end
- return recurse(x-1) + x; // recurse call
+ return 1; // recurse end
+ return recurse(x - 1) + x; // recurse call
}
int main(int argc, char const *argv[]) {
diff --git a/lldb/test/API/tools/lldb-dap/step/main.cpp b/lldb/test/API/tools/lldb-dap/step/main.cpp
index 3027551972fc..8905beb5e7ef 100644
--- a/lldb/test/API/tools/lldb-dap/step/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/step/main.cpp
@@ -1,10 +1,8 @@
int function(int x) {
if ((x % 2) == 0)
- return function(x-1) + x; // breakpoint 1
+ return function(x - 1) + x; // breakpoint 1
else
return x;
}
-int main(int argc, char const *argv[]) {
- return function(2);
-}
+int main(int argc, char const *argv[]) { return function(2); }
diff --git a/lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp b/lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp
index 9dba85a9ccca..b6f33b8e070a 100644
--- a/lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp
+++ b/lldb/test/API/tools/lldb-dap/terminated-event/foo.cpp
@@ -1,3 +1 @@
-int foo() {
- return 12;
-}
+int foo() { return 12; }
diff --git a/lldb/test/API/tools/lldb-dap/terminated-event/main.cpp b/lldb/test/API/tools/lldb-dap/terminated-event/main.cpp
index cd984e560e0d..50dd77c0a9c1 100644
--- a/lldb/test/API/tools/lldb-dap/terminated-event/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/terminated-event/main.cpp
@@ -1,5 +1,5 @@
-#include <iostream>
#include "foo.h"
+#include <iostream>
int main(int argc, char const *argv[]) {
std::cout << "Hello World!" << std::endl; // main breakpoint 1
diff --git a/lldb/test/API/tools/lldb-dap/variables/main.cpp b/lldb/test/API/tools/lldb-dap/variables/main.cpp
index d81a9a20544a..da09ecb474f3 100644
--- a/lldb/test/API/tools/lldb-dap/variables/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/variables/main.cpp
@@ -11,8 +11,8 @@ static int s_global = 234;
int test_indexedVariables();
int main(int argc, char const *argv[]) {
static float s_local = 2.25;
- PointType pt = { 11,22, {0}};
- for (int i=0; i<BUFFER_SIZE; ++i)
+ PointType pt = {11, 22, {0}};
+ for (int i = 0; i < BUFFER_SIZE; ++i)
pt.buffer[i] = i;
int x = s_global - g_global - pt.y; // breakpoint 1
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/69264
More information about the lldb-commits
mailing list