lldb.expr: lldb.expr

Description Usage Arguments Details Value Examples

View source: R/raw.r

Description

Extract data from the process into R via an expression.

Usage

1
lldb.expr(expr, offset = 0, size = 1, fixed = TRUE, handle = NULL)

Arguments

expr

expression to evaluate

offset

offset index to read from

size

number of elements to read

fixed

if true, the expr parameter is a fixed string and should not be evaluated for special sequences

handle

handle returned from lldb.load() or NULL for the default handle

Details

Expressions containing the special sequence "$$" will iterate over array at that position. This allows for extraction of child elements in an array of structs.

Value

The requested data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(lldbR)
lldb.load("/path/to/binary")

### Break at line 10 of the specified source file 
lldb.breakline("/path/to/source.c", 10)
lldb.run()

### Extract x[0]
lldb.expr("x")
### Extract x[2] to x[4]
lldb.expr("x", 2, 3)
### Extract y[2].start to y[4].start
lldb.expr("y[$$].start", 2, 3, fixed=FALSE)

## End(Not run)

heckendorfc/lldbR documentation built on March 16, 2020, 12:24 a.m.