From: Andrew Cagney <ac131313@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] dwarf2read.c: complain() -> complaint()
Date: Wed, 11 Dec 2002 14:34:00 -0000 [thread overview]
Message-ID: <3DF7BCBC.3060704@redhat.com> (raw)
In-Reply-To: <vt27keg6ye1.fsf@zenia.red-bean.com>
> ac131313@redhat.com (Andrew Cagney) writes:
>
>> > It looks fine to me.
>> >
>> > I was uncomfortable with the idea of having to create wrapper
>> > functions at first --- the idea being that each occurrence of a
>> > complaint string is its own independent complaint --- but it seems
>> > like it'll do the right thing by default more often than making people
>> > create complaint structures. So I'll go with that.
>
>>
>> I'm not sure what you mean. The wrapper function was only suggested
>> when an identical complaint is being reported from more than one place
>> in the file. See "complaints.h".
>
>
> I've read complaints.h, and complaints.c. I guess the behavior which
> would make more sense to me is for complaints with identical message
> texts to be treated as the same complaint, even if they're made from
> distinct source locations. That way, the wrapper functions would be
> unnecessary: you could just complain with the same text in two places,
> and the identity of the messages would be enough to associate them.
Ah, that. At the time I wrote:
http://sources.redhat.com/ml/gdb-patches/2002-09/msg00446.html
http://sources.redhat.com/ml/gdb-patches/2002-08/msg00360.html
> I don't use the most efficient of algorithms when detecting duplicate complaints. But then, I don't know how often complaints are occuring and my objective is to fix the format miss-match.
and it didn't raise an eyebrow.
> As far as comparing format string addresses goes: don't compilers have
> permission to merge identical strings, when strings are placed in
> read-only memory? That is, if I write "foo" in two places, can't the
> compiler make them both point to the same memory?
>
> If this is so, then the behavior of the complaints stuff depends on
> compiler behavior. (Not that that's a very imporant problem.)
GDB unfortunatly doesn't currently get past -Wwrite-strings so I don't
think anyone tries to build it that way :-( It is definitly getting
closer though!
Andrew
next prev parent reply other threads:[~2002-12-11 22:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 15:42 Kevin Buettner
2002-12-10 8:32 ` Andrew Cagney
2002-12-10 9:03 ` Kevin Buettner
2002-12-11 10:47 ` Jim Blandy
2002-12-11 12:23 ` Andrew Cagney
2002-12-11 14:15 ` Jim Blandy
2002-12-11 14:34 ` Andrew Cagney [this message]
2002-12-11 13:02 ` Kevin Buettner
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=3DF7BCBC.3060704@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@redhat.com \
/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