This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [tree-ssa mudflap] source file/line locations


Hi -


rth wrote:

> > What's the alternative?  At this point, a single location string
> > is given to each __mf_check call.
> 
> There are lots of solutions, depending on how elaborate
> you want to get.  

I was responding to the "having to pass more arguments to the runtime"
part of what you wrote.  I was pointing out that the single additional
string is pretty minimal already, and we were definitely not
contemplating adding more for this purpose.


> Do you store this location, or only 
> use it immedately if the check fails?

The latter, at this point.


> I think the most clever solution would be to use the debug
> information present in the executable image, using the return
> address of the __mf_check call as the location key.  [...]

Right, and using `addr2line` to map to a source file/line.
One obvious problem is that this relies on the presence and
accuracy/usability of debugging info.  FWIW, we already toy
with the glibc backtrace functions.


- FChE


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