Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 382279 [details] Testcase C++ file Description of problem: When trying to print a member of a gdb variable, I get the following errors: ../../gdb/value.c:571: internal-error: set_value_address: Assertion `value->lval != lval_internalvar && value->lval != lval_internalvar_component' failed. Version-Release number of selected component (if applicable): gdb-7.0-7.fc12.x86_64 How reproducible: Every time Steps to Reproduce: 1. Compile the attached test.cpp (g++ -g test.cpp) 2. gdb ./a.out (after this, all steps are gdb commands) 3. break test.cpp:8 4. run 5. set $myvar = s 6. p $myvar.mFoo Actual results: ../../gdb/value.c:571: internal-error: set_value_address: Assertion `value->lval != lval_internalvar && value->lval != lval_internalvar_component' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) Expected results: Prints 5. Additional info: This used to work in earlier versions of gdb.
Oh, and I ran into this while trying to gdb Mozilla; one of my gdb macros that I use for printing out some Mozilla data structures uses just such temporary variables that it then tries to print members of...
Nice catch and reproducer, thanks, fixed. It was a regression due to the Fedora VLA extension - for array[variable_length] and Fortran dynamic arrays.
gdb-7.0.1-26.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/gdb-7.0.1-26.fc12
gdb-7.0.1-26.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
Confirmed that gdb-7.0.1-26.fc12 fixes this problem. Thank you for fixing this!