Skip to content

Commit

Permalink
BUG FIX: new children in change list add to expression (cs01#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyihao authored and Chad Smith committed Jun 25, 2017
1 parent 4b50ee6 commit f0994b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gdbgui/static/js/gdbgui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ const Expressions = {
obj = child_obj
}else{
console.error(`could not find ${name_to_find}`)
return undefined
}
}
return obj
Expand Down Expand Up @@ -2498,6 +2499,11 @@ const Expressions = {
, obj = Expressions.get_obj_from_gdb_var_name(expressions, changelist.name)

if(obj){
if('new_children' in changelist){
let expr_type = state.get("expr_type")
let new_children = changelist.new_children.map(child_obj => Expressions.prepare_gdb_obj_for_storage(child_obj, expr_type))
obj.children = obj.children.concat(new_children)
}
if('value' in changelist && obj.expr_type === 'expr'){
// this object is an expression and it had a value updated.
// save the value to an array for plotting
Expand Down

0 comments on commit f0994b4

Please sign in to comment.