From: David Carlton <carlton@math.stanford.edu>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com,
Elena Zannoni <ezannoni@redhat.com>, Jim Blandy <jimb@redhat.com>
Subject: Re: [rfa] delete lookup_symbol_aux_minsyms
Date: Mon, 24 Feb 2003 18:04:00 -0000 [thread overview]
Message-ID: <ro1y9451rp0.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <20030222205011.GA25494@nevyn.them.org>
On Sat, 22 Feb 2003 15:50:11 -0500, Daniel Jacobowitz <drow@mvista.com> said:
> On Sat, Feb 22, 2003 at 11:54:40AM -0800, David Carlton wrote:
>> So what's the conclusion? Performance considerations don't seem to
>> give a clear answer. So we should go with whatever's cleanest. My
>> recommendation:
>>
>> * Delete the 'else' clause: it might cause correctness problems.
>>
>> * Comment out the remaining part of lookup_symbol_aux_minsyms: if
>> somebody comes up with a situation where we spend lots of time
>> searching for functions that aren't in a loaded symtab, we can
>> consider uncommenting it and adding it back in.
> I'm pretty sure the answer is "none at all" based on skimming the
> code, but what affect does removing lookup_symbol_aux_minsyms have
> when looking for something which turns out not to have debugging
> info? lookup_symbol would fail, so it doesn't matter - is that
> right?
That's right: lookup_symbol tries to find symbols, so if a function
doesn't have debugging info, then lookup_symbol will return NULL
(unless we're in some sort of bizarre situation like having a static
function elsewhere with the same name), at which point it's the
caller's responsibility to call lookup_minimal_symbol if the caller is
in a position to deal with minimal symbols instead of symbols. And
lookup_symbol would have returned NULL either before or after my
patch: the call to 'find_pc_sect_symtab' would have failed.
> I don't know if I like this comment-out-part-delete-part business;
> if we don't want the function, let's kill it.
It's not my first choice, either, but Elena has shown a preference in
the past for commenting out code like this instead of deleting it.
(C.f. the already commented-out bit in lookup_symbol_aux.) This seems
to me a situation where it's not worth arguing about it. However, if
Elena would rather delete it, I'd be happy to go along with that, too.
David Carlton
carlton@math.stanford.edu
next prev parent reply other threads:[~2003-02-24 18:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-22 19:54 David Carlton
2003-02-22 21:23 ` Daniel Jacobowitz
2003-02-24 18:04 ` David Carlton [this message]
2003-02-24 18:17 ` Elena Zannoni
2003-02-24 18:37 ` David Carlton
2003-02-24 18:52 ` Elena Zannoni
2003-02-24 23:43 ` David Carlton
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=ro1y9451rp0.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=drow@mvista.com \
--cc=ezannoni@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