LLDB-Debugging | The LLDB Debugging in C , Swift , Objective-C , Python | Code Inspection library
kandi X-RAY | LLDB-Debugging Summary
kandi X-RAY | LLDB-Debugging Summary
The LLDB Debugger (LLDB) is an open-source software debugger that is a next generation, high-performance. It features a REPL, along with C++ and Python plugins. A debugger allows you to pause a program at a specific moment of its execution, inspect the values of variables, execute custom instructions, and then manipulate the advancement of the program as you see fit. LLDB is the default debugger in Xcode on Mac OS X and supports debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LLDB-Debugging
LLDB-Debugging Key Features
LLDB-Debugging Examples and Code Snippets
Community Discussions
Trending Discussions on LLDB-Debugging
QUESTION
I am trying to improve my debugging skills, so started reading around here. I have the following piece of code:
...ANSWER
Answered 2017-Mar-16 at 01:07I'm not sure this helps, but what is going on is a little more complicated than you think.
Swift strings are actually structs, so if you stopped on the line before you assign to self.text.label
, and assign a new value to your label
var, you are actually changing the contents of the struct, which should by all rights mean that when you assign to self.text.label
from that struct, it really should pick up the new value...
The reason that doesn't work is that the swift compiler is smart about unboxing these structs so that it doesn't do unnecessary dereferences when possible. This happens even at -Onone
.
So for instance, in your example the swift compiled code has already unboxed the string and emitted code that directly references the contents. Changing the actual string contents doesn't change the references to the unboxed contents already in the assignment code, and so your change doesn't take.
You can see this IRL: if you make the compiler unable to know what the contents of the string are, it can't do this unboxing, and then you will see your debugger changes take effect.
Using this example code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LLDB-Debugging
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page