public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break'
@ 2011-05-24 16:02 jan.kratochvil at redhat dot com
2011-05-24 16:36 ` [Bug breakpoints/12803] " keiths at redhat dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-05-24 16:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
Summary: Regression: const/volatile method functions linespec
`break'
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
AssignedTo: unassigned@sourceware.org
ReportedBy: jan.kratochvil@redhat.com
CC: keiths@redhat.com
==> 8.h <==
class C {
public:
void m () const;
void n () volatile;
};
==> 8.C <==
#include "8.h"
C c;
int main () {
c.m ();
c.n ();
}
==> 8b.C <==
#include "8.h"
void C::m () const { }
void C::n () volatile { }
g++ -o 8b.o -c 8b.C -Wall; g++ -o 8 8.C 8b.o -Wall -g
# gcc-c++-4.6.0-7.fc15.x86_64
42284fdf9d8cdb20c8e833bdbdb2b56977fea525^ (pre-physname GDB)
(gdb) b 'C::m() const'
Breakpoint 1 at 0x4004f8
(gdb) b 'C::n() volatile'
Breakpoint 2 at 0x400502
42284fdf9d8cdb20c8e833bdbdb2b56977fea525 (physname GDB)
d55b1ed48098d6e48b569b5e123f2c7a8e2ea3f8 (FSF GDB HEAD)
(gdb) b 'C::m() const'
the class C does not have any method named m() const
Hint: try 'C::m() const<TAB> or 'C::m() const<ESC-?>
(Note leading single quote.)
(gdb) b 'C::n() volatile'
the class C does not have any method named n()
Hint: try 'C::n() volatile<TAB> or 'C::n() volatile<ESC-?>
(Note leading single quote.)
This is a physname regression.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
@ 2011-05-24 16:36 ` keiths at redhat dot com
2011-05-24 16:52 ` jan.kratochvil at redhat dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: keiths at redhat dot com @ 2011-05-24 16:36 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
Keith Seitz <keiths at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at sourceware |keiths at redhat dot com
|dot org |
--- Comment #1 from Keith Seitz <keiths at redhat dot com> 2011-05-24 16:35:54 UTC ---
(In reply to comment #0)
> (gdb) b 'C::m() const'
> the class C does not have any method named m() const
> Hint: try 'C::m() const<TAB> or 'C::m() const<ESC-?>
> (Note leading single quote.)
> (gdb) b 'C::n() volatile'
> the class C does not have any method named n()
> Hint: try 'C::n() volatile<TAB> or 'C::n() volatile<ESC-?>
> (Note leading single quote.)
"break 'C::m() const'" does work, but you must "set lang c++" first. This is
because keep_name_info in linespec.c is only called when the current language
is set to c++. We could change this to unconditionally call this; from
decode_compound, it should be relatively safe (assertion untested). What do you
think?
The volatile case is a bug: keep_name_info does not include it. When it is
added, then it works. I can prepare a patch and some tests for this.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
2011-05-24 16:36 ` [Bug breakpoints/12803] " keiths at redhat dot com
@ 2011-05-24 16:52 ` jan.kratochvil at redhat dot com
2011-05-24 17:05 ` keiths at redhat dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-05-24 16:52 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-05-24 16:51:46 UTC ---
(In reply to comment #1)
> "break 'C::m() const'" does work, but you must "set lang c++" first.
Aha, again, OK.
> This is because keep_name_info in linespec.c is only called when the current
> language is set to c++. We could change this to unconditionally call this;
> from decode_compound, it should be relatively safe (assertion untested). What
> do you think?
Yes, I would prefer it, it was already so in pre-phys and getting current
language correctly set does not always work.
> The volatile case is a bug: keep_name_info does not include it. When it is
> added, then it works. I can prepare a patch and some tests for this.
OK, thanks.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
2011-05-24 16:36 ` [Bug breakpoints/12803] " keiths at redhat dot com
2011-05-24 16:52 ` jan.kratochvil at redhat dot com
@ 2011-05-24 17:05 ` keiths at redhat dot com
2011-05-24 19:02 ` jan.kratochvil at redhat dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: keiths at redhat dot com @ 2011-05-24 17:05 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #3 from Keith Seitz <keiths at redhat dot com> 2011-05-24 17:04:41 UTC ---
(In reply to comment #1)
> "break 'C::m() const'" does work, but you must "set lang c++" first. This is
> because keep_name_info in linespec.c is only called when the current language
> is set to c++. We could change this to unconditionally call this; from
> decode_compound, it should be relatively safe (assertion untested). What do you
> think?
Actually, I was incorrect. keep_name_info is guarded in one place by the
current language. There are other uses in decode_line_1 which are unguarded.
keep_name_info does do some c++-specific things (keeping overload & template
info), but I am unable to invent a specific case where this would interfere
with C, and the test suite shows no regressions by removing this guard
(linespec.c:1615).
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
` (2 preceding siblings ...)
2011-05-24 17:05 ` keiths at redhat dot com
@ 2011-05-24 19:02 ` jan.kratochvil at redhat dot com
2011-05-24 21:00 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-05-24 19:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2011-05-24 19:01:42 UTC ---
(In reply to comment #1)
> "break 'C::m() const'" does work, but you must "set lang c++" first.
But that still does not work for me, sorry for nodding it first.
(gdb) show language
The current source language is "auto; currently c++".
(gdb) set language c++
tested with:
gcc-c++-4.6.0-7.fc15.x86_64
g++ (GCC) 4.7.0 20110524 (experimental)
g++ (GCC) 4.4.7 20110524 (prerelease)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
` (3 preceding siblings ...)
2011-05-24 19:02 ` jan.kratochvil at redhat dot com
@ 2011-05-24 21:00 ` cvs-commit at gcc dot gnu.org
2011-05-24 21:01 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-05-24 21:00 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-05-24 21:00:14 UTC ---
CVSROOT: /cvs/src
Module name: src
Changes by: kseitz@sourceware.org 2011-05-24 21:00:09
Modified files:
gdb : ChangeLog linespec.c
Log message:
PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
(decode_compound): Unconditionally call keep_name_info.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13044&r2=1.13045
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linespec.c.diff?cvsroot=src&r1=1.119&r2=1.120
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
` (4 preceding siblings ...)
2011-05-24 21:00 ` cvs-commit at gcc dot gnu.org
@ 2011-05-24 21:01 ` cvs-commit at gcc dot gnu.org
2011-05-25 0:30 ` keiths at redhat dot com
2011-07-02 19:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-05-24 21:01 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-05-24 21:00:50 UTC ---
CVSROOT: /cvs/src
Module name: src
Changes by: kseitz@sourceware.org 2011-05-24 21:00:45
Modified files:
gdb/testsuite : ChangeLog
gdb/testsuite/gdb.cp: cmpd-minsyms.cc cmpd-minsyms.exp
Log message:
PR breakpoint/12803
* gdb.cp/cmpd-minsyms.cc (a): New method.
(b): New method.
(c): New method.
* gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2723&r2=1.2724
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/cmpd-minsyms.cc.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.cp/cmpd-minsyms.exp.diff?cvsroot=src&r1=1.1&r2=1.2
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
` (5 preceding siblings ...)
2011-05-24 21:01 ` cvs-commit at gcc dot gnu.org
@ 2011-05-25 0:30 ` keiths at redhat dot com
2011-07-02 19:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: keiths at redhat dot com @ 2011-05-25 0:30 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
Keith Seitz <keiths at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Keith Seitz <keiths at redhat dot com> 2011-05-25 00:29:31 UTC ---
Fix committed. If I've missed anything, please re-open this bug.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug breakpoints/12803] Regression: const/volatile method functions linespec `break'
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
` (6 preceding siblings ...)
2011-05-25 0:30 ` keiths at redhat dot com
@ 2011-07-02 19:35 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2011-07-02 19:35 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=12803
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2011-07-02 19:34:48 UTC ---
CVSROOT: /cvs/src
Module name: src
Branch: gdb_7_3-branch
Changes by: jkratoch@sourceware.org 2011-07-02 19:34:43
Modified files:
gdb : ChangeLog linespec.c
Log message:
commit 2bdc820adfead6aa7fdb16242280473af1040d4e
Author: Keith Seitz <keiths@redhat.com>
Date: Tue May 24 21:00:04 2011 +0000
gdb/
PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
(decode_compound): Unconditionally call keep_name_info.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&only_with_tag=gdb_7_3-branch&r1=1.12887.2.45&r2=1.12887.2.46
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linespec.c.diff?cvsroot=src&only_with_tag=gdb_7_3-branch&r1=1.117.2.1&r2=1.117.2.2
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-07-02 19:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 16:02 [Bug breakpoints/12803] New: Regression: const/volatile method functions linespec `break' jan.kratochvil at redhat dot com
2011-05-24 16:36 ` [Bug breakpoints/12803] " keiths at redhat dot com
2011-05-24 16:52 ` jan.kratochvil at redhat dot com
2011-05-24 17:05 ` keiths at redhat dot com
2011-05-24 19:02 ` jan.kratochvil at redhat dot com
2011-05-24 21:00 ` cvs-commit at gcc dot gnu.org
2011-05-24 21:01 ` cvs-commit at gcc dot gnu.org
2011-05-25 0:30 ` keiths at redhat dot com
2011-07-02 19:35 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).