From: Jason Merrill <jason@redhat.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: gdb@sources.redhat.com, fnf@redhat.com, Jason Merrill <jason@redhat.com>
Subject: Re: gdb.c++ failures
Date: Thu, 10 Jan 2002 13:25:00 -0000 [thread overview]
Message-ID: <wvl8zb5ew6b.fsf@prospero.cambridge.redhat.com> (raw)
In-Reply-To: <20020110143328.B9479@nevyn.them.org> (Daniel Jacobowitz's message of "Thu, 10 Jan 2002 14:33:28 -0500")
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
>>>>> "Daniel" == Daniel Jacobowitz <drow@mvista.com> writes:
> On Thu, Jan 10, 2002 at 07:21:18PM +0000, Jason Merrill wrote:
>> The stabs output from gcc ignores const and volatile. There is even a
>> comment saying that "stabs does not distinguish const and volatile".
>> The method qualifiers are described, and gdb could do the work to apply
>> them to the type of 'this', but it's probably fine just to leave it as it
>> is.
> There are documented extensions to STABS to express both const and
> volatile. GDB supports them, and documents them - see info stabs.
> They're originally Sun extensions.
> Could I persuade you to add them to GCC? It would take you less time
> than I.
Give this a whirl. The output looks right to me, but gdb doesn't seem to
like it much.
2002-01-10 Jason Merrill <jason@redhat.com>
* dbxout.c (dbxout_type): Support const and volatile.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2369 bytes --]
*** dbxout.c.~1~ Thu Jan 10 15:48:14 2002
--- dbxout.c Thu Jan 10 21:22:53 2002
*************** dbxout_type (type, full)
*** 1050,1067 ****
type = integer_type_node;
else
{
- /* Try to find the "main variant" with the same name but not const
- or volatile. (Since stabs does not distinguish const and volatile,
- there is no need to make them separate types. But types with
- different names are usefully distinguished.) */
-
- for (tem = TYPE_MAIN_VARIANT (type); tem; tem = TYPE_NEXT_VARIANT (tem))
- if (!TYPE_READONLY (tem) && !TYPE_VOLATILE (tem)
- && TYPE_NAME (tem) == TYPE_NAME (type))
- {
- type = tem;
- break;
- }
if (TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
&& TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (type)))
--- 1050,1055 ----
*************** dbxout_type (type, full)
*** 1157,1168 ****
typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_DEFINED;
! if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
! && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
! {
! dbxout_type (DECL_ORIGINAL_TYPE (TYPE_NAME (type)), 0);
! return;
! }
switch (TREE_CODE (type))
{
--- 1145,1182 ----
typevec[TYPE_SYMTAB_ADDRESS (type)].status = TYPE_DEFINED;
! /* If this type is a variant of some other, hand off. Types with
! different names are usefully distinguished. */
! {
! tree main_variant;
!
! if (TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
! && DECL_ORIGINAL_TYPE (TYPE_NAME (type)))
! main_variant = TREE_TYPE (TYPE_NAME (type));
! else
! main_variant = TYPE_MAIN_VARIANT (type);
!
! if (TYPE_READONLY (type) > TYPE_READONLY (main_variant))
! {
! putc ('k', asmfile);
! CHARS (1);
! dbxout_type (build_type_variant (type, 0, TYPE_VOLATILE (type)), 0);
! return;
! }
! else if (TYPE_VOLATILE (type) > TYPE_VOLATILE (main_variant))
! {
! putc ('B', asmfile);
! CHARS (1);
! dbxout_type (build_type_variant (type, TYPE_READONLY (type), 0), 0);
! return;
! }
! else if (main_variant != TYPE_MAIN_VARIANT (type))
! {
! dbxout_type (DECL_ORIGINAL_TYPE (TYPE_NAME (type)), 0);
! return;
! }
! /* else this isn't a cv-variant, so keep going. */
! }
switch (TREE_CODE (type))
{
next prev parent reply other threads:[~2002-01-10 21:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-10 9:12 Michael Elizabeth Chastain
2002-01-10 11:21 ` Jason Merrill
2002-01-10 11:32 ` Daniel Jacobowitz
2002-01-10 13:25 ` Jason Merrill [this message]
2002-01-11 17:11 ` Daniel Jacobowitz
-- strict thread matches above, loose matches on Subject: below --
2002-01-10 5:18 Jason Merrill
2002-01-10 11:52 ` Daniel Jacobowitz
2002-01-10 12:59 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wvl8zb5ew6b.fsf@prospero.cambridge.redhat.com \
--to=jason@redhat.com \
--cc=fnf@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=mec@shout.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox