bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb-7.2 c++ break points


From: Harald Koenig
Subject: gdb-7.2 c++ break points
Date: Wed, 29 Sep 2010 18:06:35 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi,

gdb-7.2 seems to have some trouble with c++ symbol completion for setting break 
points
which did not show up in gdb-7.1 and earlier (built myself with gcc-4.3.2 on 
opensuse 11.1 64bit):



a) for the small hello-world program below, when I try to set a bp to "h1" by 
typing

   b 'h1<TAB>

sometimes gdb immediately completes to 'h1()' -- no other signatures are shown.
this happend several times (new gdb processes) when testing this bug sample,
but right now it's correctly working again as expected:

    (gdb) b 'h1<TAB>
    h1         h1()       h1(char*)  h1(int)    
    (gdb) b 'h1


-------------------------------------------------------------------------------
#include <iostream>

void h1()
{
  std::cout << "Hello\n";
}

void h1(int i)
{
  std::cout << "Hello " << i << "\n";
}

void h1(char *s)
{
  std::cout << "Hello " << s << "\n";
}

int main()
{
  h1();
  h1(1);
  h1("2");
}
-------------------------------------------------------------------------------



b) from a colleague who first pointed at the gdb07.2 problems using the 
attached "gdb.bug-cpp":
"Junk at end of arguments"


Using gcc-4.4.3


> gdb ./gdb-bug
GNU gdb (GDB) 7.2
Copyright (C) 2010 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/hrenka/test/cpp/gdb-bug...done.
(gdb) b 'osg::Program::PerContextProgram::linkProgram()' 
Junk at end of arguments.
(gdb) b 'osg::Program::PerContextProgram::linkProgram()'
Breakpoint 1 at 0x4009ba: file gdb-bug.cpp, line 18.
(gdb)


-

First try:
use autocompletion, which gives an extra space after closing hyphen.

Second try:
use history and remove extra space.




Harald Koenig
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig                                          \/\/\/\/\/\/\/\/\/
science+computing ag                                    //  /     \\  \
address@hidden                            ^^^^^       ^^^^^
-- 
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 

Attachment: gdb-bug.cpp
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]