[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to trace a link error back to the responsible line of source cod
From: |
Guy Harrison |
Subject: |
Re: How to trace a link error back to the responsible line of source code. |
Date: |
Fri, 28 May 2004 09:14:32 +0100 |
User-agent: |
KNode/0.7.2 |
Steve Mading wrote:
>
> Quick summary: Is there a way to make G++ and GLD trace
> back line number references to let me know where a particular
> function call is being attempted in the original source files?
> I keep getting an error during linking that claims I'm
> trying to call a particular constructor that doesn't exist
> (other versions of that constructor exist, but not with this
> particular set of parameters). I can't figure out where
> that nonexistent constructor is allegedly being called from.
> I tried finding it with clever uses of grep and came up dry,
> then I tried finding it with a 'dumb' text search on all uses
> of that class name, scanning each line by eye to try to find
> where I'm allegedly making this call from. But I still can't
> find it and I've searched every matching line that exists in
> my main code and my libraries.
>
> It seems to me like the information to be available to match
> the call attempt back to the source code line numbers that
> attempt it. After all, such information is included for use
> by the debugger when I use a '-g' option, so it should somehow
> be there during the linking stage, if only I could get at it.
You don't give any concrete details. Try generating asm (-S) and searching
that.
--
Guy Harrison