From: "Michael Snyder" <michsnyd@cisco.com>
To: <cagney@redhat.com>
Cc: <gdb-patches@sources.redhat.com>
Subject: [plaintive noise] Andrew, this old change broke things
Date: Wed, 09 Mar 2005 01:46:00 -0000 [thread overview]
Message-ID: <006c01c52449$bcd9a580$15a66b80@msnyder8600> (raw)
Hi Andrew,
I only just had occasion to notice this change that you made a year ago:
2004-02-09 Andrew Cagney <cagney@redhat.com>
* blockframe.c (find_pc_partial_function): If find_pc_overlay
fails, try find_pc_section. Fix PR c++/1267.
* minsyms.c (lookup_minimal_symbol_by_pc): Use find_pc_section
instead of find_pc_mapped_section.
(lookup_minimal_symbol_by_pc_section): If the SECTION is NULL, do
not default to the section containing PC. Fix PR symtab/1519.
This is not-the-right-thing (tm), and it breaks things.
The "section" argument for these functions was introduced *only* for
the purpose of overlays. In fact, all of the functions with like "pc_section"
in their names are overlay-aware versions of other, simpler, pre-existing
functions. The *only* difference between, for instance, find_pc_psymtab
and find_pc_sect_psymtab is supposed to be that the later works in the
presence of overlays.
lookup_minimal_symbol_by_pc calls find_pc_mapped_section,
which *only* returns a non-zero argument if overlay debugging
is in effect. In all other cases, lookup_minimal_symbol_by_pc
should be identical in effect to lookup_minimal_symbol_by_pc_section.
If you're not debugging overlays, the section argument should be zero.
Your comment explains that you found it to be zero most of the time
(which you did not realize was intentional), and so substituted
a call to find_pc_section -- but that defeats the intent.
If you can tell me what problem you were trying to solve,
I might be able to help figure out the right solution.
Michael
reply other threads:[~2005-03-09 1:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='006c01c52449$bcd9a580$15a66b80@msnyder8600' \
--to=michsnyd@cisco.com \
--cc=cagney@redhat.com \
--cc=gdb-patches@sources.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