https://github.com/ZequanWu created
https://github.com/llvm/llvm-project/pull/88792
If user sets a breakpoint at `_dl_debug_state` before the process launched, the
breakpoint is not resolved yet. When lldb loads dynamic loader module, it's
created with `Target::GetOrCreateModule` which notifie
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Zequan Wu (ZequanWu)
Changes
If user sets a breakpoint at `_dl_debug_state` before the process launched, the
breakpoint is not resolved yet. When lldb loads dynamic loader module, it's
created with `Target::GetOrCreateModule` which notifie
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
0287a5cc4e2a5ded1ae2e4079f91052e6a6b8d9b...26528cd679478448edf446e0e82e5f207ffd6113
lldb
jimingham wrote:
When a shared library gets loaded, its sections have to have been loaded before
asking the breakpoint system to try to set new breakpoints. Presumably this is
how it happens for all the other shared library loads, or breakpoints in shared
libraries wouldn't work.
I'm missing
jasonmolenda wrote:
Skimming DynamicLoaderPOSIXDYLD (as it is written today), it looks like
attach/launch call `SetRendezvousBreakpoint()` which (1) loads ld.so into lldb
if it isn't already there, and (2) sets the breakpoint to be notified about
future binaries loading. It loads ld.so via `L
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
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/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/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
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`
> >
ZequanWu wrote:
> Can you check where does the second event get sent from? Is it by any chance
> when we go through
> [this](https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp#L460)
> place ?
The first event is sent when crea
labath wrote:
So, could the fix be as simple as passing notify=false in the first call ?
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm
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/4] [lldb][DynamicLoader] Fix lldb unable to stop at
_dl_debug_stat
ZequanWu wrote:
> So, could the fix be as simple as passing notify=false in the first call ?
Yeah, absolutely. Updated.
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cg
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 0287a5cc4e2a5ded1ae2e4079f91052e6a6b8d9b
7cf26285a4d75a639d4bbdbf361187c809a5569f --
@@ -572,9 +572,14 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInterpreterModule() {
ModuleSpec module_spec(file, target.GetArchitecture());
if (ModuleSP module_sp = target.GetOrCreateModule(module_spec,
-true /* notify */)) {
https://github.com/labath approved this pull request.
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -572,9 +572,14 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInterpreterModule() {
ModuleSpec module_spec(file, target.GetArchitecture());
if (ModuleSP module_sp = target.GetOrCreateModule(module_spec,
-true /* notify */)) {
https://github.com/jimingham edited
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
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/5] [lldb][DynamicLoader] Fix lldb unable to stop at
_dl_debug_stat
@@ -572,9 +572,14 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadInterpreterModule() {
ModuleSpec module_spec(file, target.GetArchitecture());
if (ModuleSP module_sp = target.GetOrCreateModule(module_spec,
-true /* notify */)) {
https://github.com/ZequanWu closed
https://github.com/llvm/llvm-project/pull/88792
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
25 matches
Mail list logo