Hello,
I am debugging in Rust using the lldb-rust debugger (As I understand it, simply lldb with a python script to format Rust types into something readable).
I have an issue when I want to make condition breakpoints, where what is displayed is not the same as what I am actually accessing under all the formatting rules.
Below I have a variable which looks fine:
(lldb) var technician->__1.skill_hours
(std::collections::hash::map::HashMap<shared_types::scheduling_environment::worker_environment::resources::Resources, shared_types::scheduling_environment::work_order::operation::Work, std::hash::random::RandomState>) technician->__1.skill_hours = size=3 {
[0] = {
0 = MtnMech
1 = {
0 = {
flags = 65536
hi = 0
lo = 6318
mid = 0
}
}
}
}
Now I want to make a breakpoint saying:
breakpoint <relevant file and line in source code> --condition 'technician->__1.skill_hours.<WHAT TO WRITE HERE?>
The only available field that I can find is the .base
which will yield:
(lldb) var technician->__1.skill_hours.base
(hashbrown::map::HashMap<shared_types::scheduling_environment::worker_environment::resources::Resources, shared_types::scheduling_environment::work_order::operation::Work, std::hash::random::RandomState, alloc::alloc::Global>) technician->__1.skill_hours.base = {
hash_builder = {
k0 = 12774794751665827137
k1 = 1019342888363619915
}
table = {
table = {
bucket_mask = 3
ctrl = {
pointer = 0x00007fffe80227d0
}
growth_left = 0
items = 3
}
alloc =
marker =
}
}
This is completely different and I assume is related to lower level details of how Rust handles a HashMap.
Does this mean that you cannot readily make conditional breakpoint on many of the Rust types?
Source: View source