This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/RFA] Fix busted logic in find_saved_register()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: thorpej at wasabisystems dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 20 Apr 2002 19:08:03 -0400
- Subject: Re: [PATCH/RFA] Fix busted logic in find_saved_register()
- References: <20020420144817.W1627@dr-evil.shagadelic.org>
> find_saved_register() is used by mips_get_saved_register() and
> the alpha_get_saved_register() in my (updated) multi-arch changes
> for the Alpha target.
>
> While investigating some testsuite failures, it appeared that
> there is no way thjat find_saved_register() could possibly work
> on either MIPS or Alpha, since the first thing it does on either
> of those platforms is dereference a NULL pointer (said pointer is
> initlaized to NULL at the top of the function).
>
> I believe the following patch makes find_saved_register() actually
> implement the logic it claims to. It certainly fixes the problem
> I had with GDB dumping core, and fixes the relevant testsuite failures.
>
> OK to commit?
>
> * frame.c (find_saved_register): Avoid a NULL pointer
> dereference and actually walk the frame list.
Yes. Looks like my:
2002-04-17 Andrew Cagney <ac131313@redhat.com>
* frame.c (find_saved_register): Find saved registers in the next
not prev frame.
Fix PR gdb/365.
flushed out another problem.
You mention that the alpha is calling that function. Is that directly
or indirectly? I'm going to eliminate the MIPS direct call.
Andrew