This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Abort backtrace when consecutive zero PCs?
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: gdb at sources dot redhat dot com, cagney at gnu dot org
- Date: Wed, 15 Sep 2004 14:47:23 -0400
- Subject: Re: Abort backtrace when consecutive zero PCs?
- References: <41487D1D.7040504@gnu.org>
Andrew Cagney <cagney@gnu.org> wrote:
> While we definitly need to allow a backtrace through a single zero PC
> (for a NULL pointer call - signull.exp) should we make GDB abort when
> two or more consecutive frames have a zero PC?
Perhaps abort it after an identical frame is seen a second time?
It's not the zero-ness that kills us, it's the repetition.
The naive check would take O(n^2/2) time for n stack frames,
but if you use a clever data structure, it would be O(n lg n) time.
Michael