From: "Paul N. Hilfinger" <hilfingr@otisco.mckusick.com>
To: cagney@cygnus.com, gdb-patches@sources.redhat.com
Subject: Advice needed on fix to heuristic_proc_desc in mips-tdep.c
Date: Mon, 26 Feb 2001 04:17:00 -0000 [thread overview]
Message-ID: <200102261216.EAA16281@localhost.localdomain> (raw)
I have developed a patch for an obscure problem I've encountered in
MIPS code (specifically on IRIX). Consider a source file containing
void global_f (...) {
...
}
static void local_f (...) {
...
}
and suppose that this file has been compiled with no debugging
information (as in the implementations of many standard libraries).
Consider what happens when someone stepi's into or seg faults in
local_f (I did say "obscure", did I not?). Basically,
non_heuristic_proc_desc fails, but finds the start of the nearest
preceding global function, global_f. heuristic_proc_desc then starts
looking through the prologue of global_f, and generally gets terribly
confused.
Now, I am experimenting with an obvious but kludgy patch: rather than
blindly accept non_heuristic_proc_desc's guess as to the beginning of
the enclosing function, I use it as a limit for looking backwards from
the current pc in the same fashion as heuristic_proc_start. That way,
I find the beginning of local_f, and use that (correctly) as the beginning
of the current function.
I know: debugging in code without debugging symbols is probably
inherently kludgy. Even considering that, though, I am a bit
uncomfortable with my current solution.
So: comments, anyone?
Paul Hilfinger
Ada Core Technologies
reply other threads:[~2001-02-26 4:17 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=200102261216.EAA16281@localhost.localdomain \
--to=hilfingr@otisco.mckusick.com \
--cc=cagney@cygnus.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