This is the mail archive of the
mailing list for the GDB project.
Re: [rfa] Mips heuristic_proc_desc vs. the stack pointer.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 19 Nov 2001 16:30:31 -0500
- Subject: Re: [rfa] Mips heuristic_proc_desc vs. the stack pointer.
- References: <20011116162423.A30736@nevyn.them.org>
> As HJ noticed, we try to read the stack pointer in heuristic_proc_desc. I'm
> not sure why this normally works and fails with linuxthread support, but I'm
> convinced it's sometimes wrong. If we are called from after_prologue(), the
> stack pointer has nothing to do with the function we're trying to generate a
> desc for. We shouldn't try to read it in this case. The uses of it in
> *_heuristic_proc_desc are harmless.
Regarding the threads, are you saying things still sometimes break with
your patch applied? I suspect there was the usual GDB internal thread
coherency problem where different parts of GDB were debugging different
> Is this OK, Andrew?
Yes, but can you please adjust the following before committing:
> * mips-tdep.c (find_proc_desc): Add read_sp argument. Update all
Given the updates were not identical / mechanical, could you please list
each making it clear that after_prologue() was the exception.
Can you please add a comment to after_prologue() explaining why the SP
shouldn't be fetched in that case.
Can the argument be called read_sp_p (say?) rather than read_sp. There
is a global function read_sp that is hiding behind that variable.
> (heuristic_proc_desc): Likewise. Do not read SP if read_sp == 0.