RFH: PR 44645 - missing debug info for C++ pointer types

2010-09-18 Thread Jonathan Wakely
Could someone more familiar with dwarf2out.c take a look at PR 44645?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44645

It is a fairly problematic regression in C++ debug info, which causes
errors in the python pretty printers for libstdc++ associative
contaienrs (map, set etc.) and has several duplicate PRs now.

As Tom Tromey originally identified, the DIE for some pointer types is
missing DW_AT_type, which makes GDB think it's dealing with a void*
not the actual pointer type, and that prevents dereferencing pointers
while debugging.

I've tried to find a problem in dwarf2out.c on the 4.5 branch and
compared it with the versions on the 4.4 branch and trunk (which don't
have the bug) but I'm stumped.

Any pointers or help would be much appreciated.

Jonathan


Re: RFH: PR 44645 - missing debug info for C++ pointer types

2010-09-18 Thread Jonathan Wakely
HJ has just identified the commit that caused the problem - I should
have waited a few more minutes before sending my RFH :-)

Thanks, HJ



On 18 September 2010 14:31, Jonathan Wakely  wrote:
> Could someone more familiar with dwarf2out.c take a look at PR 44645?
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44645
>
> It is a fairly problematic regression in C++ debug info, which causes
> errors in the python pretty printers for libstdc++ associative
> contaienrs (map, set etc.) and has several duplicate PRs now.
>
> As Tom Tromey originally identified, the DIE for some pointer types is
> missing DW_AT_type, which makes GDB think it's dealing with a void*
> not the actual pointer type, and that prevents dereferencing pointers
> while debugging.
>
> I've tried to find a problem in dwarf2out.c on the 4.5 branch and
> compared it with the versions on the 4.4 branch and trunk (which don't
> have the bug) but I'm stumped.
>
> Any pointers or help would be much appreciated.
>
> Jonathan
>


Re: RFH: PR 44645 - missing debug info for C++ pointer types

2010-09-18 Thread H.J. Lu
On Sat, Sep 18, 2010 at 6:33 AM, Jonathan Wakely  wrote:
> HJ has just identified the commit that caused the problem - I should
> have waited a few more minutes before sending my RFH :-)
>
> Thanks, HJ
>

I should find the fix on trunk in about an hour.



-- 
H.J.


Re: RFH: PR 44645 - missing debug info for C++ pointer types

2010-09-18 Thread H.J. Lu
On Sat, Sep 18, 2010 at 6:35 AM, H.J. Lu  wrote:
> On Sat, Sep 18, 2010 at 6:33 AM, Jonathan Wakely  
> wrote:
>> HJ has just identified the commit that caused the problem - I should
>> have waited a few more minutes before sending my RFH :-)
>>
>> Thanks, HJ
>>
>
> I should find the fix on trunk in about an hour.
>

Patch was approved for 4.5:

http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00104.html

I applied it now.


-- 
H.J.


Reverse mapping from decl uid

2010-09-18 Thread Uday P. Khedker


Given a tree node, we can get its uid by using DECL_UID(node).

Given a uid, is it possible to directly get the tree node that
corresponds to it? I can of course make a list of nodes that I
am interested in but if there is an API, I would much rather
use it.

Thanks.

Uday.

P.S. : Earlier, I have written pretty complex code because I
   didn't know some of the APIs :-(

   Trying to become wiser now :-)


Re: RFH: PR 44645 - missing debug info for C++ pointer types

2010-09-18 Thread Jonathan Wakely
On 18 September 2010 15:50, H.J. Lu wrote:
> On Sat, Sep 18, 2010 at 6:35 AM, H.J. Lu  wrote:
>> On Sat, Sep 18, 2010 at 6:33 AM, Jonathan Wakely  
>> wrote:
>>> HJ has just identified the commit that caused the problem - I should
>>> have waited a few more minutes before sending my RFH :-)
>>>
>>> Thanks, HJ
>>>
>>
>> I should find the fix on trunk in about an hour.
>>
>
> Patch was approved for 4.5:
>
> http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00104.html
>
> I applied it now.

You're a star, thanks for tracking it down.

Jonathan


gcc-4.6-20100918 is now available

2010-09-18 Thread gccadmin
Snapshot gcc-4.6-20100918 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/4.6-20100918/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 4.6 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/trunk revision 164403

You'll find:

 gcc-4.6-20100918.tar.bz2 Complete GCC (includes all of below)

  MD5=df58dde2bf10d64b813ff2c5ba9e3bd4
  SHA1=b6d20f94df5d5b2e37984bc74ea5414b5eb00d6c

 gcc-core-4.6-20100918.tar.bz2C front end and core compiler

  MD5=e0138c10b4c9a1ee3daeae0937c03562
  SHA1=deb699119bd3f52153860236de3b23694e667e77

 gcc-ada-4.6-20100918.tar.bz2 Ada front end and runtime

  MD5=dd361407dbebf99b20ffe125cf7b960c
  SHA1=783451348cd07d7d9d6fd1e93ad2c91335300b98

 gcc-fortran-4.6-20100918.tar.bz2 Fortran front end and runtime

  MD5=1cddc1e4712ac69a214d337eaae08394
  SHA1=250a27075d1c00e839221a59ed7c9e2fbc77c1d6

 gcc-g++-4.6-20100918.tar.bz2 C++ front end and runtime

  MD5=183e4c67bf6b6a5eba4544389e63d302
  SHA1=8779b2978d7f8b11b15f1838308a14786481332c

 gcc-java-4.6-20100918.tar.bz2Java front end and runtime

  MD5=d08ed6424fd1418729a270c38e72c0ea
  SHA1=187b99e0c614ac0f37d84d310f61ea6cc5772fc8

 gcc-objc-4.6-20100918.tar.bz2Objective-C front end and runtime

  MD5=c51ff40a5f80b98b139219e96089aaaf
  SHA1=89cfd5d043c1a233403f21783a73c968520dcafa

 gcc-testsuite-4.6-20100918.tar.bz2   The GCC testsuite

  MD5=0cd1be48b95cc16213ab30b22724e173
  SHA1=5c92c90e3a9bb0189867224bd191d1e95b97b2fb

Diffs from 4.6-20100911 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-4.6
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.