@@ -3433,8 +3433,40 @@ bool GDBRemoteCommunicationClient::CalculateMD5(
return false;
if (response.Peek() && *response.Peek() == 'x')
return false;
-low = response.GetHexMaxU64(false, UINT64_MAX);
-high = response.GetHexMaxU64(false, UINT64_MAX);
+
+
@@ -1184,7 +1184,7 @@ bool Platform::IsCompatibleArchitecture(const ArchSpec
&arch,
Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
uint32_t uid, uint32_t gid) {
Log *log = GetLog(LLDBLog::Platform);
- LLDB_LOGF(log, "[
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
DavidSpickett wrote:
If you really need
DavidSpickett wrote:
@weliveindetail I think this might fix the problems you were having remote
debugging clang-repl (I can't seem to find the actual Discourse thread).
https://github.com/llvm/llvm-project/pull/88812
___
lldb-commits mailing list
lldb
DavidSpickett wrote:
I think this will fix https://github.com/llvm/llvm-project/issues/47549. And
make the note at the end of `lldb/docs/use/qemu-testing.rst` outdated.
For testing we might be able to send the platform the gdbserver spawn packets
and check that it doesn't return the same port
@@ -324,6 +335,10 @@ int main_platform(int argc, char *argv[]) {
// connections while a connection is active.
acceptor_up.reset();
}
+
+GDBRemoteCommunicationServerPlatform::PortMap portmap_for_child;
+portmap_for_child.AllowPort(*port);
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
DavidSpickett wrote:
If we're going to use optional then this should be left to default co
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
DavidSpickett wrote:
Will fix https://github.com/llvm/llvm-project/issues/85084.
https://github.com/llvm/llvm-project/pull/88494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,59 @@
+"""
+Test that the process continues running after we detach from it.
+"""
+
+import lldb
+import time
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class DetachResumesTestCase(TestBase):
DavidSpickett wrote:
Thanks for looking into this. I had no idea what it might be but your
explanation makes a lot of sense.
https://github.com/llvm/llvm-project/pull/88494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.o
ZequanWu wrote:
> why not just call ModulesDidLoad and delegate this (and possibly other
> binary-just-loaded) behaviors to it?
That's what I did first, but it breaks the test
`TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications`
because of extra broadcaster event. S
ZequanWu wrote:
> I'm missing why the _dl_debug_state breakpoint is special here, such that it
> requires a force load of the section info? How does that happen?
Jason's comment explains it well. It's because ld.so's loading is special here.
Normal binaries are loaded via `DynamicLoaderPOSIXDY
Author: Adrian Prantl
Date: 2024-04-16T08:29:09-07:00
New Revision: f8e2ec13a8c6d33cb7b4f37869b4429ddcf43f01
URL:
https://github.com/llvm/llvm-project/commit/f8e2ec13a8c6d33cb7b4f37869b4429ddcf43f01
DIFF:
https://github.com/llvm/llvm-project/commit/f8e2ec13a8c6d33cb7b4f37869b4429ddcf43f01.diff
adrian-prantl wrote:
@usama54321 I had to revert this because it broke both the arm64 and x86 bots:
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/1078/
https://github.com/llvm/llvm-project/pull/88349
___
lldb-commits mailing list
ll
labath wrote:
> > why not just call ModulesDidLoad and delegate this (and possibly other
> > binary-just-loaded) behaviors to it?
>
> That's what I did first, but it breaks the test
> `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications`
> because of extra broadcaste
https://github.com/ZequanWu updated
https://github.com/llvm/llvm-project/pull/88792
>From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001
From: Zequan Wu
Date: Mon, 15 Apr 2024 16:30:38 -0400
Subject: [PATCH 1/2] [lldb][DynamicLoader] Fix lldb unable to stop at
_dl_debug_stat
https://github.com/jeffreytan81 approved this pull request.
https://github.com/llvm/llvm-project/pull/88494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,48 @@
+#include "pseudo_barrier.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+pseudo_barrier_t barrier;
+
+constexpr size_t nthreads = 5;
+volatile bool wait_for_debugger_flag = true;
+
+void break_here() {}
+
+void tfunc() {
+ pseudo_barrier_
https://github.com/jeffreytan81 edited
https://github.com/llvm/llvm-project/pull/88494
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,59 @@
+"""
+Test that the process continues running after we detach from it.
+"""
+
+import lldb
+import time
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class DetachResumesTestCase(TestBase):
@@ -0,0 +1,48 @@
+#include "pseudo_barrier.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+pseudo_barrier_t barrier;
+
+constexpr size_t nthreads = 5;
+volatile bool wait_for_debugger_flag = true;
+
+void break_here() {}
+
+void tfunc() {
+ pseudo_barrier_
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
bulbazord wrote:
I see. I wouldn't say
https://github.com/bulbazord edited
https://github.com/llvm/llvm-project/pull/88812
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/bulbazord commented:
Looking better! Let's get the comments and style sorted out, but I think this
is looking good :)
https://github.com/llvm/llvm-project/pull/88812
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://
@@ -684,6 +684,14 @@ Status PlatformRemoteGDBServer::RunShellCommand(
signo_ptr, command_output, timeout);
}
+bool PlatformRemoteGDBServer::CalculateMD5(const FileSpec &file_spec,
+ uint64_t &l
https://github.com/ZequanWu updated
https://github.com/llvm/llvm-project/pull/88792
>From 26528cd679478448edf446e0e82e5f207ffd6113 Mon Sep 17 00:00:00 2001
From: Zequan Wu
Date: Mon, 15 Apr 2024 16:30:38 -0400
Subject: [PATCH 1/3] [lldb][DynamicLoader] Fix lldb unable to stop at
_dl_debug_stat
ZequanWu wrote:
> > > why not just call ModulesDidLoad and delegate this (and possibly other
> > > binary-just-loaded) behaviors to it?
> >
> >
> > That's what I did first, but it breaks the test
> > `TestModuleLoadedNotifys.ModuleLoadedNotifysTestCase.test_launch_notifications`
> > because
https://github.com/usama54321 created
https://github.com/llvm/llvm-project/pull/88962
The previous patch was reverted because the test fails to build when
libsanitizers is not present. This patch catches the BuildError exception and
skips the test appropriately.
This patch tests LLDB integrat
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Usama Hameed (usama54321)
Changes
The previous patch was reverted because the test fails to build when
libsanitizers is not present. This patch catches the BuildError exception and
skips the test appropriately.
This patch tests LLDB integ
https://github.com/jimingham approved this pull request.
The only change here was catching the build errors, right? lldbtest.build only
throws exceptions, it doesn't return any value, so this seems the right way to
do it.
Letting the build system fail to find this library seems easier than tr
mordante wrote:
Thanks for the fix!
https://github.com/llvm/llvm-project/pull/88312
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
usama54321 wrote:
> The only change here was catching the build errors, right? lldbtest.build
> only throws exceptions, it doesn't return any value, so this seems the right
> way to do it.
>
> Letting the build system fail to find this library seems easier than trying
> to check ourselves.
>
https://github.com/jasonmolenda approved this pull request.
This looks good, thanks for the revisions.
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/feg208 created
https://github.com/llvm/llvm-project/pull/88995
This adds some additional bits into a ProcessInfo structure that will be of use
in filling structs in an elf core file. This is a demand for implementing
process save-core
>From 9b8ec4d0c31ad1b228add56bc27cd7945
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Fred Grim (feg208)
Changes
This adds some additional bits into a ProcessInfo structure that will be of use
in filling structs in an elf core file. This is a demand for implementing
process save-core
---
Full diff: https://github.com/llvm/
ayermolo wrote:
@clayborg
Figured I reply here to your comment:
https://github.com/llvm/llvm-project/pull/88092#issuecomment-2059961175
This was regarding merging .debug_names in linker (although types are not
implemented yet there), but FYI BOLT output is similar.
All the CUs are in one module
jimingham wrote:
These seem like fairly POSIX-y bits of data, is there not a Posix way to get
these (so other posix systems will also get this info?)
Also, it looks like you added user time and system time information, but you
didn't test that those get valid values.
https://github.com/llvm/l
Author: Usama Hameed
Date: 2024-04-16T16:00:14-07:00
New Revision: 988ffd06722e7e056b239efe497345ac97be33db
URL:
https://github.com/llvm/llvm-project/commit/988ffd06722e7e056b239efe497345ac97be33db
DIFF:
https://github.com/llvm/llvm-project/commit/988ffd06722e7e056b239efe497345ac97be33db.diff
https://github.com/usama54321 closed
https://github.com/llvm/llvm-project/pull/88962
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
feg208 wrote:
> These seem like fairly POSIX-y bits of data, is there not a Posix way to get
> these (so other posix systems will also get this info?)
Not that I know of for arbitrary processes in linux. fwiw the original code
without these values got similar bits out of the proc filesystem
>
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88812
>From 095696411172034f80233f1722e293c1f458d67f Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:34:19 +
Subject: [PATCH 1/3] [lldb] Skip remote PutFile when MD5 hashes equal
---
.../gdb-serve
@@ -1184,7 +1184,7 @@ bool Platform::IsCompatibleArchitecture(const ArchSpec
&arch,
Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
uint32_t uid, uint32_t gid) {
Log *log = GetLog(LLDBLog::Platform);
- LLDB_LOGF(log, "[
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const
FileSpec &destination,
if (!source_file)
return Status(source_file.takeError());
Status error;
+
+ bool requires_upload = true;
+ {
Awfa wrote:
Just removed the scoping -
https://github.com/Awfa updated https://github.com/llvm/llvm-project/pull/88845
>From 3d75f42b5f61ea126001919491aa09ebd15ba9f8 Mon Sep 17 00:00:00 2001
From: Anthony Ha
Date: Mon, 15 Apr 2024 19:36:34 +
Subject: [PATCH 1/2] [lldb] Have lldb-server assign ports to children in
platform mode
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
if (g_server) {
// Collect child zombie processes.
#if !defined(_WIN32)
- while (waitpid(-
@@ -301,13 +294,31 @@ int main_platform(int argc, char *argv[]) {
exit(socket_error);
}
printf("Connection established.\n");
+
+std::optional port = 0;
Awfa wrote:
I removed the optional port here, and just set the portmap within the
availab
@@ -324,6 +335,10 @@ int main_platform(int argc, char *argv[]) {
// connections while a connection is active.
acceptor_up.reset();
}
+
+GDBRemoteCommunicationServerPlatform::PortMap portmap_for_child;
+portmap_for_child.AllowPort(*port);
jimingham wrote:
> On Apr 16, 2024, at 5:17 PM, Fred Grim ***@***.***> wrote:
>
>
> These seem like fairly POSIX-y bits of data, is there not a Posix way to get
> these (so other posix systems will also get this info?)
>
> Not that I know of for arbitrary processes in linux. fwiw the origina
emaste wrote:
> is there not a Posix way to get these
Not really. On FreeBSD these generally come from sysctl(s).
Of the ones added in this pull request SetParentProcessID is already handled on
FreeBSD, while SetProcessGroupID, SetProcessSessionID, SetUserTime,
SetSystemTime, SetCumulativeUse
emaste wrote:
MD5 is insufficient for claiming that files are identical; how do we migrate
this to a secure hash?
https://github.com/llvm/llvm-project/pull/88812
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
Awfa wrote:
> MD5 is insufficient for claiming that files are identical; how do we migrate
> this to a secure hash?
Is there an attack vector you're concerned about?
Or are you wary of workflow friction when a file won't upload to the remote
platform because the hashes accidently collide?
ht
54 matches
Mail list logo