lldb

LLDB: Python API & Setting callback function for a watchpoint

心不动则不痛 提交于 2019-12-11 11:07:30
问题 Looking at the documentation for SBWatchpoint at http://lldb.llvm.org/python_reference/index.html, I do not see a method for assigning a python callback function for when a watchpoint is triggered. Is there a way to do this with the Python API? 回答1: There is a watchpoint command add command that supports doing that watchpoint command add [-e <boolean>] [-s <none>] [-F <python-function>] <watchpt-id> If you have an SBWatchpoint, you can query for its ID, and then craft an appropriate command

Strange behavior in LLDB when printing a double type struct member

痞子三分冷 提交于 2019-12-11 10:32:19
问题 In some iOS code, I have an C struct ivar on an object. One of the members of this struct is of type double . If I, within a method, assign to this struct member, the debugger reports spurious values for the value of this struct member when I print the struct itself (as does the list view of variables), but when I print the struct member directly, ( p structWithDouble.doubleMember ), I get the right value. Furthermore, If I assign the value of this member to a local, automatic double var, I

How to fix lldb stopping immediately after run call?

为君一笑 提交于 2019-12-11 10:04:17
问题 I'm using lldb on Mojave with Xcode 10.2.1. As soon as command 'run' to lldb, this happens: (lldb) target create "<executable>" Current executable set to '<executable>' (x86_64). (lldb) run Process 95857 launched: '/Users/<path to executable>' (x86_64) Process 95857 stopped * thread #2, stop reason = exec frame #0: 0x0000000102491000 dyld`_dyld_start dyld`_dyld_start: -> 0x102491000 <+0>: popq %rdi 0x102491001 <+1>: pushq $0x0 0x102491003 <+3>: movq %rsp, %rbp 0x102491006 <+6>: andq $-0x10,

Given the address of an object, how would I call Obj-C methods on it in an LLDB Python script?

烈酒焚心 提交于 2019-12-11 07:24:17
问题 In pseudo-code, I'd like to create a reusable LLDB Python script that works like this: get_super_class(int address) { return ((id)address).getSuperClass(); } Called like this: (lldb) get_super_class(0x123abc) UIViewController Any ideas? I'm a python novice. I would think there is something in the documentation for SBValue that would get me close to what I want, but I don't see it if there is. 回答1: I am not at my computer (actually at a restaurant in Reno :) so what follows is mostly cursory

When can lldb autocomplete expression?

吃可爱长大的小学妹 提交于 2019-12-11 06:08:35
问题 Seems sometimes lldb can autocomplete a expression but sometimes this feature break. 回答1: The lldb command line has auto-completion for a bunch of commands and options, but not for the expressions you are typing in the print (i.e. expr ) command. If you are using Xcode, that will suggest auto-completions using its source analysis tools. If you find instances where that isn't working, file a bug with http://bugreporter.apple.com and the Xcode folks can take a look. 来源: https://stackoverflow

App crashes only with (lldb)?

别说谁变了你拦得住时间么 提交于 2019-12-11 04:51:43
问题 I have an app with Cocos2D and some UIKit mixed in. I have recently been implementing some new features so maybe the memory management is wrong or something is getting over-released but whenever I exit the app by clicking the home button, the console just crashes only with the message (lldb). Even if I turn on NSZombiesEnabled nothing different happens. The only thing my app points to is a line that looks like this: libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient: 0x38101094:

lldb cannot find iOS app running in Simulator in order to attach

陌路散爱 提交于 2019-12-11 04:47:31
问题 This is a follow-up question to How can I use Swift REPL with iOS SDK. I have an app named Venmo which is already running on a simulator: and I can see it in the Activity Monitor: I would like to open a Swift REPL in which can use classes defined in the Venmo project. Following the instructions in that answer, I first find the app in my DerivedData directory; $ cd ~/Library/Developer/Xcode/DerivedData $ find . -name '*Venmo.app' ./VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products

Is lldb working with fortran?

≯℡__Kan透↙ 提交于 2019-12-11 03:44:36
问题 I am trying to breakpoint a fortran program with lldb on a Mac OS 10.12.5 system. I have program badcall integer a,b a=2 b=3 write(*,*) a, b end I ( have to ) compile with the intel compilers. ifort -g badcall.f90 -o badcall then I run with lldb and do breakpoint set -f badcall.f90 -l 5 programs stops normally Process 59474 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x0000000100000f35 prova`MAIN__ at badcall.f90:6 3 a=2 4 b=3 5 However if I

breakpoint with debugger Commend jump in xcode

ぐ巨炮叔叔 提交于 2019-12-11 02:52:44
问题 I made a breakpoint in Xcode with the jump commend to force passing some condition, but when it execute to line 168 it crash with message "Thread 1: EXC_BAD_ACCESS (code=1, address=0x1)" why did that happen? the console logged: warning: MoreMultitypeCollectionViewCell.swift:178 appears multiple times in this function, selecting the first location: MoreMultitypeCollectionViewCell.(updateButtonStateCkeck in _9A12557DCAB30EEB52DC7C2EA09487CD)() -> () + 1580 at MoreMultitypeCollectionViewCell

Breakpoints only sometimes work in Xcode 10

∥☆過路亽.° 提交于 2019-12-11 02:20:55
问题 I need to keep building my project until the debugger actually works by stopping on breakpoints. It's really annoying. Some builds stop on breakpoints, some don't. This answer no longer seems to be relevant to my particular issue. 来源: https://stackoverflow.com/questions/57117144/breakpoints-only-sometimes-work-in-xcode-10