This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] Fix busted logic in find_saved_register()


> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]