Bug 553338 - GDB internal error while trying to print out member of variable
Summary: GDB internal error while trying to print out member of variable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 727726
TreeView+ depends on / blocked
 
Reported: 2010-01-07 16:41 UTC by Boris Zbarsky
Modified: 2011-08-03 03:32 UTC (History)
3 users (show)

Fixed In Version: 7.0.1-26.fc12
Clone Of:
: 727726 (view as bug list)
Environment:
Last Closed: 2010-01-07 21:00:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Testcase C++ file (75 bytes, text/plain)
2010-01-07 16:41 UTC, Boris Zbarsky
no flags Details

Description Boris Zbarsky 2010-01-07 16:41:34 UTC
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.

Comment 1 Boris Zbarsky 2010-01-07 16:43:46 UTC
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...

Comment 2 Jan Kratochvil 2010-01-07 21:00:24 UTC
Nice catch and reproducer, thanks, fixed.
It was a regression due to the Fedora VLA extension - for array[variable_length] and Fortran dynamic arrays.

Comment 3 Fedora Update System 2010-01-14 00:37:47 UTC
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

Comment 4 Fedora Update System 2010-01-15 22:10:11 UTC
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.

Comment 5 Boris Zbarsky 2010-02-01 18:17:51 UTC
Confirmed that gdb-7.0.1-26.fc12 fixes this problem.  Thank you for fixing this!


Note You need to log in before you can comment on or make changes to this bug.