Your message dated Sat, 18 Jun 2016 00:52:54 +0200
with message-id <[email protected]>
and subject line closing bugs reported against ancient GCC versions
has caused the Debian Bug report #509173,
regarding [Fixed in 4.4] gdb: "no locals" in C++ constructors
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
509173: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509173
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 6.8-3, 6.8.50.20081210.python-1
Severity: normal

It is very hard to debug something in C++ constructors because GDB
failes to see any local variables in it. Consider this tiny example:

<<< main.cpp >>>
-8<-
#include <string>
#include <iostream>

using std::string;

class A
{
    string str;

 public:
    A()
    {
        string sa = "aa";
        string sb = "bb";
        str = sa + sb; // debug me
    }
    void print() const
    {
        std::cout << str << '\n';
    }
};

int main()
{
    A a;
    a.print();
}
->8-

<<< GDB session >>>
-8<-
$ gdb main.e
GNU gdb (GDB) 6.8.50.20081120-cvs-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) b main.cpp:15
Breakpoint 1 at 0x400d7b: file main.cpp, line 15.
(gdb) run
Starting program:
/home/jackyf/Work/Programming/linux/SmallTests/gdb-debugging-constructor/main.e 

Breakpoint 1, A (this=0x7fffffffe500) at main.cpp:15
15                      str = sa + sb;
(gdb) print sa
No symbol "sa" in current context.
(gdb) print sb
No symbol "sb" in current context.
(gdb) q
->8-


-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28-rc7jackyf (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gdb depends on:
ii  libc6                  2.7-16            GNU C Library: Shared libraries
ii  libexpat1              2.0.1-4           XML parsing C library - runtime li
ii  libncurses5            5.7+20081129-1    shared libraries for terminal hand
ii  libreadline5           5.2-3             GNU readline and history libraries
ii  python2.5              2.5.2-14          An interactive high-level object-o
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

gdb recommends no packages.

Versions of packages gdb suggests:
ii  gdb-doc                       6.8-1      The GNU Debugger Documentation

-- no debconf information



--- End Message ---
--- Begin Message ---
This bug has been reported against an ancient version of
gpc (4.1), gcc/g++/gfortran (4.3), or gcj/gij/gobjc (4.4), that was last
released with Debian 6.0 (squeeze). But even squeeze-lts has now reached
end-of-life and is no longer supported.
The bug is assumed to be fixed (or no longer relevant) in newer GCC
releases and therefore I'm closing this report now. If the problem is
still reproducible in the currently supported versions (gcc-5, gcc-6 or
corresponding g++/gcj), feel free to provide more information, reopen
and reassign this bug report.


Andreas

--- End Message ---

Reply via email to