[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-20 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > I can push the button for you if you could just update the patch description > to what you'd like the commit message to say (in particular, I think the last > paragraph is no longer correct). > > As for cherry-picking, is this related to the lldb-server platform

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-20 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security edited https://github.com/llvm/llvm-project/pull/131609 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-10 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-07 Thread Yuval Deutscher via lldb-commits
@@ -58,3 +59,45 @@ def test_platform_process_launch_gdb_server(self): self.runCmd("target create {}".format(self.getBuildArtifact("a.out"))) self.expect("run", substrs=["unable to launch a GDB server on"], error=True) + +@skipIfRemote +@skipUnlessPlatf

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-07 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-06 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-06 Thread Yuval Deutscher via lldb-commits
@@ -58,3 +59,45 @@ def test_platform_process_launch_gdb_server(self): self.runCmd("target create {}".format(self.getBuildArtifact("a.out"))) self.expect("run", substrs=["unable to launch a GDB server on"], error=True) + +@skipIfRemote +@skipUnlessPlatf

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-06 Thread Yuval Deutscher via lldb-commits
@@ -58,3 +59,45 @@ def test_platform_process_launch_gdb_server(self): self.runCmd("target create {}".format(self.getBuildArtifact("a.out"))) self.expect("run", substrs=["unable to launch a GDB server on"], error=True) + +@skipIfRemote +@skipUnlessPlatf

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-06 Thread Yuval Deutscher via lldb-commits
@@ -58,3 +59,45 @@ def test_platform_process_launch_gdb_server(self): self.runCmd("target create {}".format(self.getBuildArtifact("a.out"))) self.expect("run", substrs=["unable to launch a GDB server on"], error=True) + +@skipIfRemote +@skipUnlessPlatf

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-05 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > `test_platform_process_launch_gdb_server` is worth looking into. hm, seems useful. do you think it makes sense to just modify it to run through a symlink, e.g. ``` diff --git a/lldb/test/API/commands/platform/launchgdbserver/TestPlatformLaunchGDBServer.py b/ll

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-04 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-04 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Yea, these tests only test the `lldb` binary, as evident from lit: https://github.com/yuvald-sweet-security/llvm-project/blob/main/lldb/test/API/lit.cfg.py#L247-L248 Do you know if there are any tests that run lldb-server? I couldn't find anything by grepping the r

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-04 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: @labath now that we've fixed the other issue, can you weigh in on my solution for this one? If you don't have time and want to deal with this next week, that's also fine, just making sure this PR didn't get forgotten https://github.com/llvm/llvm-project/pull/131609

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-04-04 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: @JDevlieghere @labath how do I get this PR merged? I don't think I have access to merge on my own; will one of you merge it, or am I missing something here? https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commit

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Should be good now https://github.com/llvm/llvm-project/pull/131609 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Wrote a test and it seems to pass CI, what do you say? https://github.com/llvm/llvm-project/pull/131609 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Whoops, I copied that test and didn't read what it does at the end https://github.com/llvm/llvm-project/pull/131609 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-03 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From 6f2d070facaced221295a5b0c48ccb3a41a5048d Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH 1/2] [lldb] Use correct path for debugserver ---

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-04-02 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > I'm just thinking about whether there's a way to test this. You've said that > there's a test for the scenario where lldb-server and lldb are not in the > same directory. Which one is it? Would it be possible to use a similar > approach to test this scenario as w

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-27 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: @labath I rebased it https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-27 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From 9519119f3b12854a2198542cfb7f9cff12e910e1 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-27 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > I think this #63468 is the same sort of issue. Not sure if it's the same > though. > > As you can tell from me saying "I will get back to this" 2 years ago, the > knowledge of any of that has left my head by now, but thank you for looking > into this. I know it'

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-03-27 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Solves https://github.com/llvm/llvm-project/issues/63468 https://github.com/llvm/llvm-project/pull/131609 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commit

[Lldb-commits] [lldb] [lldb] Respect LaunchInfo::SetExecutable in ProcessLauncherPosixFork (PR #133093)

2025-03-27 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > @yuvald-sweet-security Thanks. This patch means we're still ignoring the arg0 set by `SetArg0`, right? and just using whatever was in the standard `GetArguments` vector. Maybe it's worth updating the comment I pointed at (https://github.com/llvm/llvm-project/blo

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From ea0a08e60f472c518c98db0acf7e32ec328146d1 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From ea0a08e60f472c518c98db0acf7e32ec328146d1 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH 1/2] [lldb] Use correct path for lldb-server exec

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: I wrote something, lets see if it works >Process(Launch)Info has a [GS]etArg0 method, but it looks like >ProcessLauncherPosixFork doesn't actually make use of it It looks like nothing makes use of it except for the qemu launcher; the posix launcher just uses the f

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > Not exactly. I my use case, `lldb-server` would be a symlink to something > like `/cas/dead/beef/baadf00d`. The symlink value is supposed to be an > implementation detail of the CAS system. While the user could execute that > directly, it wouldn't be totally surp

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > Kind of yes, but the two issues are related. The issue with symlinks is that > once you resolve them, there's no way to go back. I'm asking why (in the > scenario you describe in that PR) does `GetModuleFileSpecForHostAddress` > return "lldb-server-19" (instead o

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-20 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > > Ah, turns out there's a HostInfo::GetProgramFileSpec() function which > > solves both these issues. > > I am aware of that function. The reason I did not suggest it is because > `GetProgramFileSpec` (on linux) returns the canonical path (with all symlinks > re

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-17 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From df4b4e2a0361eaeaace3f8578f4f30d95fee059a Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-03-17 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131609 >From a4e2c9f4fca115cc52ee69abfa584795b7102716 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Mon, 17 Mar 2025 14:37:26 +0200 Subject: [PATCH] [lldb] Use correct path for debugserver --- ll

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-03-17 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Well, looks like the tests really do check a case where lldb and lldb-server are not in the same directory. Should we just try both paths? maybe make `GetShlibDir` return false if it is linked statically? https://github.com/llvm/llvm-project/pull/131609 ___

[Lldb-commits] [lldb] [lldb] Use correct path for debugserver (PR #131609)

2025-03-17 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security created https://github.com/llvm/llvm-project/pull/131609 Hello, This solves an issue that arises when running lldb-server through a symlink which is not named exactly `lldb-server`. For example, in many distros lldb-server is packaged as e.g. `/usr/lib

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-17 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From bf755daf57a0255157f0b8ccec2372d2ef9e2ef3 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-17 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: Ah, turns out there's a `HostInfo::GetProgramFileSpec()` function which solves both these issues. https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-17 Thread Yuval Deutscher via lldb-commits
yuvald-sweet-security wrote: > I'm wondering if the right fix isn't to call > `FileSystem::ResolveExecutableLocation` on `argv[0]`. That should should give > us more-or-less the same algorithm that the shell used when starting > lldb-server. Perhaps, but note that technically argv[0] doesn't

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-17 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security edited https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-16 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security edited https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-16 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security edited https://github.com/llvm/llvm-project/pull/131519 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-16 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From 0af05f390616de8fa73fb975c4c202aac13d3745 Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-16 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security updated https://github.com/llvm/llvm-project/pull/131519 >From bbfae1028b2c47b6fe422f71516fb486d94f406b Mon Sep 17 00:00:00 2001 From: Yuval Deutscher Date: Sun, 16 Mar 2025 14:08:57 + Subject: [PATCH] [lldb] Use correct path for lldb-server executab

[Lldb-commits] [lldb] [lldb] Use correct path for lldb-server executable (PR #131519)

2025-03-16 Thread Yuval Deutscher via lldb-commits
https://github.com/yuvald-sweet-security created https://github.com/llvm/llvm-project/pull/131519 Hey, This solves an issue where running lldb-server-20 with a non-absolute path (for example, when it's installed into `/usr/bin` and the user runs it as `lldb-server-20 ...` and not `/usr/bin/ll