Skip to content

Conversation

medismailben
Copy link

@medismailben medismailben commented Oct 3, 2025

rdar://160015338&160014884&159017521&159017250

This patch adds setters to the SBStruturedData class to be able to
initialize said object from the client side directly.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
(cherry picked from commit 05b1ec3)
(cherry picked from commit ef05e83)
… mode (llvm#154651)

In 88f4091, we changed the way the crashlog scripted process was
launched since the previous approach required to parse the file twice,
by stopping at entry, setting the crashlog object in the middle of the
scripted process launch and resuming it.

Since then, we've introduced SBScriptObject which allows to pass any
arbitrary python object accross the SBAPI boundary to another scripted
affordance.

This patch make sure of that to include the parse crashlog object into
the scripted process launch info dictionary, which eliviates the need to
stop at entry.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
(cherry picked from commit 595148a)
(cherry picked from commit e4ed3f5)
…153117)

This patch changes the way frames created from scripted affordances like
Scripted Threads are displayed. Currently, they're marked artificial
which is used usually for compiler generated frames.

This patch changes that behaviour by introducing a new synthetic
StackFrame kind and moves 'artificial' to be a distinct StackFrame
attribut.

On top of making these frames less confusing, this allows us to know
when a frame was created from a scripted affordance.

rdar://155949703

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
(cherry picked from commit 6c10ab8)
(cherry picked from commit 9a81ba2)
This patch introduces a new scripting affordance in lldb:
`ScriptedFrame`.

This allows user to produce mock stackframes in scripted threads and
scripted processes from a python script.

With this change, StackFrame can be synthetized from different sources:
- Either from a dictionary containing a load address, and a frame index,
  which is the legacy way.
- Or by creating a ScriptedFrame python object.

One particularity of synthezising stackframes from the ScriptedFrame
python object, is that these frame have an optional PC, meaning that
they don't have a report a valid PC and they can act as shells that just
contain static information, like the frame function name, the list of
variables or registers, etc. It can also provide a symbol context.

rdar://157260006

(cherry picked from commit 84b5620)
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
(cherry picked from commit 1e6108d)
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
@medismailben
Copy link
Author

@swift-ci test

@medismailben
Copy link
Author

@swift-ci test macOS Platform

@medismailben
Copy link
Author

@swift-ci test Linux Platform

@medismailben
Copy link
Author

@swift-ci test macOS platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant