[lldb-dev] Accessing attached process environment variables with SBAPI

2022-01-28 Thread Ivan Hernandez via lldb-dev
Hi all, I'm trying to read the value of an environment variable that a process was launched with but to which lldb attached to after it launched. SBEnvironment looked interesting but I tried using ``` script print(lldb.debugger.GetSelectedTarget().GetEnvironment().Get("PRINT_ME") ``` and that prin

Re: [lldb-dev] Semantics of SBValue::CreateChildAtOffset

2022-01-28 Thread Greg Clayton via lldb-dev
> On Oct 22, 2021, at 6:12 AM, Pavel Labath via lldb-dev > wrote: > > Hello Jim, everyone, > > I recently got a question/bug report about python pretty printers (synthetic > child providers) that I couldn't answer. > > The actual script is of course more complicated, but the essence boils d

Re: [lldb-dev] Why can't I break on an address resulting in unresolved?

2022-01-28 Thread Greg Clayton via lldb-dev
You can set breakpoints at addresses prior to running a process. ASLR will shift shared libraries around each time you run, so it really isn't safe to set these. If you do disable ASLR, and are able to debug, just reverse your statement and do the "process launch" first: process launch --stop-a

Re: [lldb-dev] [RFC] lldb integration with (user mode) qemu

2022-01-28 Thread Greg Clayton via lldb-dev
> On Oct 28, 2021, at 6:33 AM, Pavel Labath via lldb-dev > wrote: > > Hello everyone, > > I'd like to propose a new plugin for better lldb+qemu integration. > > As you're probably aware qemu has an integrated gdb stub. Lldb is able > to communicate with it, but currently this process is some

Re: [lldb-dev] No script in lldb of build

2022-01-28 Thread Greg Clayton via lldb-dev
I have had to add the following to my cmake command line: -DPython3_EXECUTABLE=/usr/bin/python3 > On Dec 5, 2021, at 12:02 PM, Pi Pony via lldb-dev > wrote: > > Hello, > > I build lldb for macOS and tried to get into script but I get this error > message: there is no embedded script in

Re: [lldb-dev] Adding support for FreeBSD kernel coredumps (and live memory lookup)

2022-01-28 Thread Greg Clayton via lldb-dev
I am fine with a new plug-in to handle this, but I want to verify a few things first: Can this core dump file format basically allow debugging of multiple targets? For example could you for example want to examine the kernel itself as is, but also provide a view into any of the user space proce

Re: [lldb-dev] Source-level stepping with emulated instructions

2022-01-28 Thread Greg Clayton via lldb-dev
We just need to specify that the addresses for these emulated instruction address ranges have symbols and the type of these symbols are set to "eSymbolTypeTrampoline". We run into a similar case when you are stepping through the PLT entries for external functions. If your main binary has a "pri

Re: [lldb-dev] RFC: siginfo reading/writing support

2022-01-28 Thread Greg Clayton via lldb-dev
The other idea would be to allow the Platform subclasses to be able to fill in some fixed variable names when asked. So if the user typed either: (lldb) frame variable $platform.siginfo (lldb) expression $platform.siginfo We would have the name lookup mechanism check with the current platform i

Re: [lldb-dev] problems using EvaluateExpression in lldb, when it creates new object

2022-01-28 Thread Greg Clayton via lldb-dev
> On Jan 14, 2022, at 10:13 AM, fhjiwerfghr fhiewrgfheir via lldb-dev > wrote: > > I'm sorry in advance, if it's not a correct mailing list, there doesn't seem > to be lldb-usage mailing list. > > I'm writing a pretty-printer python script, which - to cut to the chase, > pretty prints mem

Re: [lldb-dev] Multiple platforms with the same name

2022-01-28 Thread Pavel Labath via lldb-dev
I'm sorry for the slow response. I had to attend to some other things first. It sounds like there's agreement to support multiple platform instances, so I'll try to move things in that direction. Further responses inline On 20/01/2022 01:19, Greg Clayton wrote: On Jan 19, 2022, at 4:28 AM,