Bug 10615 - Nested structs don't get updated in MI
Summary: Nested structs don't get updated in MI
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: mi (show other bugs)
Version: archer
: P2 normal
Target Milestone: 6.8
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-08 07:33 UTC by Noam Yorav-Raphael
Modified: 2009-09-09 16:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
File needed to recreate the bug (113 bytes, text/x-csrc)
2009-09-08 07:33 UTC, Noam Yorav-Raphael
Details
File needed to recreate the bug (192 bytes, text/x-python)
2009-09-08 07:34 UTC, Noam Yorav-Raphael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noam Yorav-Raphael 2009-09-08 07:33:04 UTC
Hello,

Thankfully, Tom fixed bug 10584. However, it seems that members of structs which
are members of pretty-printed variables still don't get updated.

To recreate:

Download bug.c, bug.py.
> gcc -g -o bug bug.c
> gdb --int mi2 --nx bug
> -enable-pretty-printing
> python execfile('bug.py')
> b main
> r
# Initialize m to {{0},0}
> n
# Do what a standard UI is expected to do to print the m variable
# Its structure is: { {int a; int b;} s; int x; }
> -var-create m * m
> -var-list-children m
> -var-evaluate-expression m.s
> -var-list-children m.s
> -var-evaluate-expression m.s.a
> -var-evaluate-expression m.s.b
> -var-evaluate-expression m.x
# Modify m.s.a
> n
# Check if something was updated
> -var-update *
^done,changelist=[]
# Oops.

Thanks,
Noam
Comment 1 Noam Yorav-Raphael 2009-09-08 07:33:44 UTC
Created attachment 4178 [details]
File needed to recreate the bug
Comment 2 Noam Yorav-Raphael 2009-09-08 07:34:03 UTC
Created attachment 4179 [details]
File needed to recreate the bug
Comment 3 Tom Tromey 2009-09-09 16:08:05 UTC
Thanks for the report & the simple test case.
I've checked in a regression test and a fix.