History log of /llvm-project-15.0.7/lldb/source/API/SBThread.cpp (Results 76 – 100 of 173)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ffb2d44a 22-Jun-2015 Greg Clayton <[email protected]>

Reduced packet counts to the remote GDB server where possible.

We have been working on reducing the packet count that is sent between LLDB and the debugserver on MacOSX and iOS. Our approach to this

Reduced packet counts to the remote GDB server where possible.

We have been working on reducing the packet count that is sent between LLDB and the debugserver on MacOSX and iOS. Our approach to this was to reduce the packets required when debugging multiple threads. We currently make one qThreadStopInfoXXXX call (where XXXX is the thread ID in hex) per thread except the thread that stopped with a stop reply packet. In order to implement multiple thread infos in a single reply, we need to use structured data, which means JSON. The new jThreadsInfo packet will attempt to retrieve all thread infos in a single packet. The data is very similar to the stop reply packets, but packaged in JSON and uses JSON arrays where applicable. The JSON output looks like:


[
{ "tid":1580681,
"metype":6,
"medata":[2,0],
"reason":"exception",
"qaddr":140735118423168,
"registers": {
"0":"8000000000000000",
"1":"0000000000000000",
"2":"20fabf5fff7f0000",
"3":"e8f8bf5fff7f0000",
"4":"0100000000000000",
"5":"d8f8bf5fff7f0000",
"6":"b0f8bf5fff7f0000",
"7":"20f4bf5fff7f0000",
"8":"8000000000000000",
"9":"61a8db78a61500db",
"10":"3200000000000000",
"11":"4602000000000000",
"12":"0000000000000000",
"13":"0000000000000000",
"14":"0000000000000000",
"15":"0000000000000000",
"16":"960b000001000000",
"17":"0202000000000000",
"18":"2b00000000000000",
"19":"0000000000000000",
"20":"0000000000000000"},
"memory":[
{"address":140734799804592,"bytes":"c8f8bf5fff7f0000c9a59e8cff7f0000"},
{"address":140734799804616,"bytes":"00000000000000000100000000000000"}
]
}
]

It contains an array of dicitionaries with all of the key value pairs that are normally in the stop reply packet. Including the expedited registers. Notice that is also contains expedited memory in the "memory" key. Any values in this memory will get included in a new L1 cache in lldb_private::Process where if a memory read request is made and that memory request fits into one of the L1 memory cache blocks, it will use that memory data. If a memory request fails in the L1 cache, it will fall back to the L2 cache which is the same block sized caching we were using before these changes. This allows a process to expedite memory that you are likely to use and it reduces packet count. On MacOSX with debugserver, we expedite the frame pointer backchain for a thread (up to 256 entries) by reading 2 pointers worth of bytes at the frame pointer (for the previous FP and PC), and follow the backchain. Most backtraces on MacOSX and iOS now don't require us to read any memory!

We will try these packets out and if successful, we should port these to lldb-server in the near future.

<rdar://problem/21494354>

llvm-svn: 240354

show more ...


# 1124045a 29-May-2015 Zachary Turner <[email protected]>

Don't #include "lldb-python.h" from anywhere.

Since interaction with the python interpreter is moving towards
being more isolated, we won't be able to include this header from
normal files anymore,

Don't #include "lldb-python.h" from anywhere.

Since interaction with the python interpreter is moving towards
being more isolated, we won't be able to include this header from
normal files anymore, all includes of it should be localized to
the python library which will live under source/bindings/API/Python
after a future patch.

None of the files that were including this header actually depended
on it anyway, so it was just a dead include in every single instance.

llvm-svn: 238581

show more ...


Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1, llvmorg-3.5.2, llvmorg-3.5.2-rc1
# a78bd7ff 03-Mar-2015 Zachary Turner <[email protected]>

Don't #include FormatManager.h from Debugger.h

Debugger.h is a huge file that gets included everywhere, and
FormatManager.h brings in a ton of unnecessary stuff and doesn't
even use anything from it

Don't #include FormatManager.h from Debugger.h

Debugger.h is a huge file that gets included everywhere, and
FormatManager.h brings in a ton of unnecessary stuff and doesn't
even use anything from it in the header.

llvm-svn: 231161

show more ...


# 93749ab3 03-Mar-2015 Zachary Turner <[email protected]>

Further reduce the header footprint of Process.h

No functional change here, only deletes unnecessary headers
and moves one function's body from the .h file to the .cpp.

llvm-svn: 231145


Revision tags: llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2
# 603985fc 28-Jan-2015 Jim Ingham <[email protected]>

SBThread::GetDescription should use the Thread format instead of making up
some format of its own.

llvm-svn: 227285


Revision tags: llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2, llvmorg-3.5.1-rc1
# dc6224e0 21-Oct-2014 Greg Clayton <[email protected]>

Make the "synchronous" mode actually work without race conditions.

There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condit

Make the "synchronous" mode actually work without race conditions.

There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.

llvm-svn: 220254

show more ...


# afdf842b 10-Oct-2014 Kuba Brecka <[email protected]>

LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction

Reviewed at http://reviews.llvm.org/D5592

This patch gives LLDB some ability to interact with Add

LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction

Reviewed at http://reviews.llvm.org/D5592

This patch gives LLDB some ability to interact with AddressSanitizer runtime library, on top of what we already have (historical memory stack traces provided by ASan). Namely, that's the ability to stop on an error caught by ASan, and access the report information that are associated with it. The report information is also exposed into SB API.

More precisely this patch...

adds a new plugin type, InstrumentationRuntime, which should serve as a generic superclass for other instrumentation runtime libraries, these plugins get notified when modules are loaded, so they get a chance to "activate" when a specific dynamic library is loaded
an instance of this plugin type, AddressSanitizerRuntime, which activates itself when it sees the ASan dynamic library or founds ASan statically linked in the executable
adds a collection of these plugins into the Process class
AddressSanitizerRuntime sets an internal breakpoint on __asan::AsanDie(), and when this breakpoint gets hit, it retrieves the report information from ASan
this breakpoint is then exposed as a new StopReason, eStopReasonInstrumentation, with a new StopInfo subclass, InstrumentationRuntimeStopInfo
the StopInfo superclass is extended with a m_extended_info field (it's a StructuredData::ObjectSP), that can hold arbitrary JSON-like data, which is the way the new plugin provides the report data
the "thread info" command now accepts a "-s" flag that prints out the JSON data of a stop reason (same way the "-j" flag works now)
SBThread has a new API, GetStopReasonExtendedInfoAsJSON, which dumps the JSON string into a SBStream
adds a test case for all of this
I plan to also get rid of the original ASan plugin (memory history stack traces) and use an instance of AddressSanitizerRuntime for that purpose.

Kuba

llvm-svn: 219546

show more ...


# 2bdbfd50 29-Sep-2014 Jim Ingham <[email protected]>

This checkin is the first step in making the lldb thread stepping mechanism more accessible from
the user level. It adds the ability to invent new stepping modes implemented by python classes,
and t

This checkin is the first step in making the lldb thread stepping mechanism more accessible from
the user level. It adds the ability to invent new stepping modes implemented by python classes,
and to view the current thread plan stack and to some extent alter it.

I haven't gotten to documentation or tests yet. But this should not cause any behavior changes
if you don't use it, so its safe to check it in now and work on it incrementally.

llvm-svn: 218642

show more ...


Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4, llvmorg-3.5.0-rc3, llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 705b1809 13-Jun-2014 Jason Molenda <[email protected]>

Initial merge of some of the iOS 8 / Mac OS X Yosemite specific
lldb support. I'll be doing more testing & cleanup but I wanted to
get the initial checkin done.

This adds a new SBExpressionOptions:

Initial merge of some of the iOS 8 / Mac OS X Yosemite specific
lldb support. I'll be doing more testing & cleanup but I wanted to
get the initial checkin done.

This adds a new SBExpressionOptions::SetLanguage API for selecting a
language of an expression.

I added adds a new SBThread::GetInfoItemByPathString for retriving
information about a thread from that thread's StructuredData.

I added a new StructuredData class for representing
key-value/array/dictionary information (e.g. JSON formatted data).
Helper functions to read JSON and create a StructuredData object,
and to print a StructuredData object in JSON format are included.

A few Cocoa / Cocoa Touch data formatters were updated by Enrico
to track changes in iOS 8 / Yosemite.

Before we query a thread's extended information, the system runtime may
provide hints to the remote debug stub that it will use to retrieve values
out of runtime structures. I added a new SystemRuntime method
AddThreadExtendedInfoPacketHints which allows the SystemRuntime to add
key-value type data to the initial request that we send to the remote stub.

The thread-format formatter string can now retrieve values out of a thread's
extended info structured data. The default thread-format string picks up
two of these - thread.info.activity.name and thread.info.trace_messages.

I added a new "jThreadExtendedInfo" packet in debugserver; I will
add documentation to the lldb-gdb-remote.txt doc soon. It accepts
JSON formatted arguments (most importantly, "thread":threadnum) and
it returns a variety of information regarding the thread to lldb
in JSON format. This JSON return is scanned into a StructuredData
object that is associated with the thread; UI layers can query the
thread's StructuredData to see if key-values are present, and if
so, show them to the user. These key-values are likely to be
specific to different targets with some commonality among many
targets. For instance, many targets will be able to advertise the
pthread_t value for a thread.

I added an initial rough cut of "thread info" command which will print
the information about a thread from the jThreadExtendedInfo result.
I need to do more work to make this format reasonably.

Han Ming added calls into the pmenergy and pmsample libraries if
debugserver is run on Mac OS X Yosemite to get information about the
inferior's power use.

I added support to debugserver for gathering the Genealogy information
about threads, if it exists, and returning it in the jThreadExtendedInfo
JSON result.

llvm-svn: 210874

show more ...


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# b4892cd2 13-May-2014 Jason Molenda <[email protected]>

Add a new SBThread::SafeToCallFunctions API; this calls over to
the SystemRuntime to check if a thread will have any problems
performing an inferior function call so the driver can skip
making that

Add a new SBThread::SafeToCallFunctions API; this calls over to
the SystemRuntime to check if a thread will have any problems
performing an inferior function call so the driver can skip
making that function call on that thread. Often the function
call can be executed on another thread instead.
<rdar://problem/16777874>

llvm-svn: 208732

show more ...


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2
# b9ffa98c 25-Apr-2014 Jason Molenda <[email protected]>

Add a new SBThread::GetQueue() method to get the queue that is
currently associated with a given thread, on relevant targets.

Change the queue detection code to verify that the queues
associated w

Add a new SBThread::GetQueue() method to get the queue that is
currently associated with a given thread, on relevant targets.

Change the queue detection code to verify that the queues
associated with all live threads are included in the list.
<rdar://problem/16411314>

llvm-svn: 207160

show more ...


Revision tags: llvmorg-3.4.1-rc1
# 8334e14e 11-Apr-2014 Greg Clayton <[email protected]>

Fixed SBThread.GetStopReasonDataAtIndex() to correctly return breakpoint location ID.

Patch from Vyacheslav Karpukhin.

llvm-svn: 206040


# 324a1036 04-Apr-2014 Saleem Abdulrasool <[email protected]>

sweep up -Wformat warnings from gcc

This is a purely mechanical change explicitly casting any parameters for printf
style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux.

llvm-

sweep up -Wformat warnings from gcc

This is a purely mechanical change explicitly casting any parameters for printf
style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux.

llvm-svn: 205607

show more ...


# 6c9ed91c 03-Apr-2014 Jim Ingham <[email protected]>

Make the fail messages

llvm-svn: 205497


# 4b4b2478 13-Mar-2014 Jim Ingham <[email protected]>

This commit reworks how the thread plan's ShouldStopHere mechanism works, so that it is useful not only
for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), bu

This commit reworks how the thread plan's ShouldStopHere mechanism works, so that it is useful not only
for customizing "step-in" behavior (e.g. step-in doesn't step into code with no debug info), but also
the behavior of step-in/step-out and step-over when they step out of the frame they started in.

I also added as a proof of concept of this reworking a mode for stepping where stepping out of a frame
into a frame with no debug information will continue stepping out till it arrives at a frame that does
have debug information. This is useful when you are debugging callback based code where the callbacks
are separated from the code that initiated them by some library glue you don't care about, among other
things.

llvm-svn: 203747

show more ...


# ac605f4a 08-Mar-2014 Jason Molenda <[email protected]>

Add API logging to the SBQueue/SBQueueItem/SBThread calls.

llvm-svn: 203330


Revision tags: llvmorg-3.4.0, llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# a6e9130d 19-Nov-2013 Jason Molenda <[email protected]>

Add logging for the SB API which creates extended
threads.

Take a stab at fixing the too-soon freeing of the extended
backtrace thread list in Process.
<rdar://problem/15496603>

llvm-svn: 195104


# 8ee9cb58 16-Nov-2013 Jason Molenda <[email protected]>

Add a new SBThread::GetExtendedBacktraceOriginatingIndexID() method
(and same thing to Thread base class) which can be used when looking
at an ExtendedBacktrace thread; it will try to find the IndexI

Add a new SBThread::GetExtendedBacktraceOriginatingIndexID() method
(and same thing to Thread base class) which can be used when looking
at an ExtendedBacktrace thread; it will try to find the IndexID() of
the original thread that was executing this backtrace when it was
recorded. If lldb can't find a record of that thread, it will return
the same value as IndexID() for the ExtendedBacktrace thread.

llvm-svn: 194912

show more ...


# 008c45f1 12-Nov-2013 Jason Molenda <[email protected]>

Change SBThread::GetExtendedBacktrace to
SBThread::GetExtendedBacktraceThread to make it more clear what is
being returned.

llvm-svn: 194531


# 7a2f7904 11-Nov-2013 Jason Molenda <[email protected]>

The Threads created when requesting extended backtraces need to be owned by
something; add a new ExtendedThreadList to Process where they can be retained
for the duration of a public stop.
<rdar://pr

The Threads created when requesting extended backtraces need to be owned by
something; add a new ExtendedThreadList to Process where they can be retained
for the duration of a public stop.
<rdar://problem/15314068>

llvm-svn: 194366

show more ...


# 02706c32 08-Nov-2013 Jason Molenda <[email protected]>

Add History subclasses for Thread, Unwind, RegisterContext.
Still working out some of the details of these classes but
I wanted to get the overall structure checked in.
<rdar://problem/15314068>

l

Add History subclasses for Thread, Unwind, RegisterContext.
Still working out some of the details of these classes but
I wanted to get the overall structure checked in.
<rdar://problem/15314068>

llvm-svn: 194245

show more ...


# 95d005c7 06-Nov-2013 Jason Molenda <[email protected]>

Rename extended backtrace methods to take out the "ThreadOrigin"
bit from the method names.
<rdar://problem/15314369>

llvm-svn: 194122


# 5dd4916f 06-Nov-2013 Jason Molenda <[email protected]>

Add a new GetThreadOriginExtendedBacktrace method to the
SystemRuntime and SBThread classes.
<rdar://problem/15314369>

llvm-svn: 194111


# b57e4a1b 04-Nov-2013 Jason Molenda <[email protected]>

Roll back the changes I made in r193907 which created a new Frame
pure virtual base class and made StackFrame a subclass of that. As
I started to build on top of that arrangement today, I found that

Roll back the changes I made in r193907 which created a new Frame
pure virtual base class and made StackFrame a subclass of that. As
I started to build on top of that arrangement today, I found that it
wasn't working out like I intended. Instead I'll try sticking with
the single StackFrame class -- there's too much code duplication to
make a more complicated class hierarchy sensible I think.

llvm-svn: 193983

show more ...


# f23bf743 02-Nov-2013 Jason Molenda <[email protected]>

Add a new base class, Frame. It is a pure virtual function which
defines a protocol that all subclasses will implement. StackFrame
is currently the only subclass and the methods that Frame vends ar

Add a new base class, Frame. It is a pure virtual function which
defines a protocol that all subclasses will implement. StackFrame
is currently the only subclass and the methods that Frame vends are
nearly identical to StackFrame's old methods.

Update all callers to use Frame*/Frame& instead of pointers to
StackFrames.

This is almost entirely a mechanical change that touches a lot of
the code base so I'm committing it alone. No new functionality is
added with this patch, no new subclasses of Frame exist yet.

I'll probably need to tweak some of the separation, possibly moving
some of StackFrame's methods up in to Frame, but this is a good
starting point.

<rdar://problem/15314068>

llvm-svn: 193907

show more ...


1234567