mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Add some NODE information for lldb
Just adds a conditional in the lldb scripts so we can more easily debug NODE objects.
This commit is contained in:
		
							parent
							
								
									94b79bffb1
								
							
						
					
					
						commit
						bdc36094e3
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -216,6 +216,12 @@ def lldb_inspect(debugger, target, result, val):
 | 
			
		|||
            else:
 | 
			
		||||
                print >> result, "T_DATA:"
 | 
			
		||||
                append_command_output(debugger, "p *(struct RData *) %0#x" % val.GetValueAsUnsigned(), result)
 | 
			
		||||
        elif flType == RUBY_T_NODE:
 | 
			
		||||
            tRTypedData = target.FindFirstType("struct RNode").GetPointerType()
 | 
			
		||||
            nd_type = (flags & RUBY_NODE_TYPEMASK) >> RUBY_NODE_TYPESHIFT
 | 
			
		||||
            append_command_output(debugger, "p (node_type) %d" % nd_type, result)
 | 
			
		||||
            val = val.Cast(tRTypedData)
 | 
			
		||||
            append_command_output(debugger, "p *(struct RNode *) %0#x" % val.GetValueAsUnsigned(), result)
 | 
			
		||||
        else:
 | 
			
		||||
            print >> result, "Not-handled type %0#x" % flType
 | 
			
		||||
            print >> result, val
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue