Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] 1.0.1 Binaries and Editor Problem

> 
> --=====================_-1545104421==_.ALT
> Content-Type: text/plain; charset="us-ascii"; format=flowed
> 
> Hi!
> 
> While I appreciate the pointer to addr2line, I tend to prefer to suspect 
> the things that my group is responsible for rather than heading off and 
> blaming the tools guys here. They have also had a product out for 4 years, 
> so I tend to be wrong alot when I go looking for them to explain something.
> 

I do not quite understand what you are trying to express, but I'm sure
its all good.

> At the moment I'm looking with a bit of suspicion at the following:
> 
> public String lineInfo() throws IOException {
> if ( line == null ) {
> if ( addr2line == null )
> addr2line = new Addr2line(file);
> line = addr2line.getLine(st_value + 19);
> func = addr2line.getFunction(st_value + 19);
> }
> return line;
> }
> 
> Somehow those + 19's look a little odd to me, especially since removing 
> them puts the line location spot on. I just can't quite figure where 19 
> came from in the first place.
> 

A bug.  I think it was done, when the grand pooba did
the initial commit of the entire cdt.core from QNX.  And after that,
it was simply overlook and went like this.
IIRC, on PowerPC it did not align, so we were trying to put some
heuristics +/- 20, This was probably check in by accident.

> I'll try to get a patch together for the other stuff at some point.
> 
> Thanks!
> -Chris
> 
> At 09:49 AM 3/10/2003 -0500, Alain Magloire wrote:
> > >
> > >
> > > Hi,
> > >
> > > The following is from 1.0.1. Do you all care?
> >
> >Yes always.
> >
> > > Is knowing about it enough or do you want the patch?
> > > (Patches are non-trivial for me to product
> > > unfortunately, but I'm willing to take the time if needed. Private 
> > email is
> > > fine.
> >
> >File a PR, we'll take a look.  But if you already have a patch it is 
> >welcome(attach to
> >the PR).
> >
> >FYI: Elf does not come up with line numbers, line infos are in the the debug
> >format and Runtime.getRuntime().exec("addr2line ..."); is use by the Elf 
> >parser
> >to retrieve it.  We are working on a basic STABS debug format parser to remove
> >the addr2line on the next revision and maybe DWARF-2.
> >
> > >
> > > >Change 62507 by songer@songer_clea on 2003/03/09 19:25:59
> > > >
> > > >         First level fix for binary object selection.
> > > >
> > > >         To go the CView and select main() under the source file and then
> > > > under a built binary. In one case (the source file) you go to the file
> > > > and line. In the other case, it just brings up the file and selects the
> > > > first line. This is the first fix for this behavior. It's not precise,
> > > > there's something screwy about the lines that their elf parser is coming
> > > > up with, but it's at least close.
> > > >
> > > >         There were actually two bugs here. First, information was being
> > > > thrown away in the translation of ISymbol->IFunction. That's the
> > > > BinaryInfo change. Next the CEditor did not deal properly with
> > > > ISourceRanges that had only line information. That's been corrected 
> > as well.
> > > >
> > > >Affected files ...
> > > >
> > > >...
> > > >//depot/other/xide/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/ 
> > core/model/BinaryInfo.java#4
> > > >edit
> > > >...
> > > >//depot/other/xide/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/e 
> > ditor/CEditor.java#4
> > > >edit
> > >
> > > Thanks!
> > > -Chris
> > > songer@xxxxxxxxxxxxx
> > >
> > > _______________________________________________
> > > cdt-dev mailing list
> > > cdt-dev@xxxxxxxxxxx
> > > http://dev.eclipse.org/mailman/listinfo/cdt-dev
> > >
> >
> >_______________________________________________
> >cdt-dev mailing list
> >cdt-dev@xxxxxxxxxxx
> >http://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
> --=====================_-1545104421==_.ALT
> Content-Type: text/html; charset="us-ascii"
> 
> <html>
> Hi!<br><br>
> While I appreciate the pointer to addr2line, I tend to prefer to suspect
> the things that my group is responsible for rather than heading off and
> blaming the tools guys here. They have also had a product out for 4
> years, so I tend to be wrong alot when I go looking for them to explain
> something.<br><br>
> At the moment I'm looking with a bit of suspicion at the
> following:<br><br>
> <font face="Courier, Courier" color="#7F0055"><b>public</b></font><font face="Courier, Courier">
> String lineInfo() </font><font face="Courier, Courier" color="#7F0055"><b>throws</b></font><font face="Courier, Courier"> IOException {<br>
> </font><font face="Courier, Courier" color="#7F0055"><b>if</b></font><font face="Courier, Courier"> ( line == </font><font face="Courier, Courier" color="#7F0055"><b>null</b></font><font face="Courier, Courier"> ) {<br>
> </font><font face="Courier, Courier" color="#7F0055"><b>if</b></font><font face="Courier, Courier"> ( addr2line == </font><font face="Courier, Courier" color="#7F0055"><b>null</b></font><font face="Courier, Courier"> )<br>
> addr2line = </font><font face="Courier, Courier" color="#7F0055"><b>new</b></font><font face="Courier, Courier"> Addr2line(file);<br>
> line = addr2line.getLine(st_value + 19);<br>
> func = addr2line.getFunction(st_value + 19);<br>
> }<br>
> </font><font face="Courier, Courier" color="#7F0055"><b>return</b></font><font face="Courier, Courier"> line;<br>
> }<br><br>
> </font>Somehow those + 19's look a little odd to me, especially since removing them puts the line location spot on. I just can't quite figure where 19 came from in the first place. <br><br>
> I'll try to get a patch together for the other stuff at some point.<br><br>
> Thanks!<br>
> -Chris<br><br>
> At 09:49 AM 3/10/2003 -0500, Alain Magloire wrote:<br>
> <blockquote type=cite class=cite cite>&gt; <br>
> &gt; <br>
> &gt; Hi,<br>
> &gt; <br>
> &gt; The following is from 1.0.1. Do you all care?<br><br>
> Yes always.<br><br>
> &gt; Is knowing about it enough or do you want the patch?<br>
> &gt; (Patches are non-trivial for me to product <br>
> &gt; unfortunately, but I'm willing to take the time if needed. Private email is <br>
> &gt; fine.<br><br>
> File a PR, we'll take a look.&nbsp; But if you already have a patch it is welcome(attach to<br>
> the PR).<br><br>
> FYI: Elf does not come up with line numbers, line infos are in the the debug<br>
> format and Runtime.getRuntime().exec(&quot;addr2line ...&quot;); is use by the Elf parser<br>
> to retrieve it.&nbsp; We are working on a basic STABS debug format parser to remove<br>
> the addr2line on the next revision and maybe DWARF-2.<br><br>
> &gt; <br>
> &gt; &gt;Change 62507 by songer@songer_clea on 2003/03/09 19:25:59<br>
> &gt; &gt;<br>
> &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; First level fix for binary object selection.<br>
> &gt; &gt;<br>
> &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To go the CView and select main() under the source file and then <br>
> &gt; &gt; under a built binary. In one case (the source file) you go to the file <br>
> &gt; &gt; and line. In the other case, it just brings up the file and selects the <br>
> &gt; &gt; first line. This is the first fix for this behavior. It's not precise, <br>
> &gt; &gt; there's something screwy about the lines that their elf parser is coming <br>
> &gt; &gt; up with, but it's at least close.<br>
> &gt; &gt;<br>
> &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; There were actually two bugs here. First, information was being <br>
> &gt; &gt; thrown away in the translation of ISymbol-&gt;IFunction. That's the <br>
> &gt; &gt; BinaryInfo change. Next the CEditor did not deal properly with <br>
> &gt; &gt; ISourceRanges that had only line information. That's been corrected as well.<br>
> &gt; &gt;<br>
> &gt; &gt;Affected files ...<br>
> &gt; &gt;<br>
> &gt; &gt;... <br>
> &gt; &gt;//depot/other/xide/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryInfo.java#4 <br>
> &gt; &gt;edit<br>
> &gt; &gt;... <br>
> &gt; &gt;//depot/other/xide/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java#4 <br>
> &gt; &gt;edit<br>
> &gt; <br>
> &gt; Thanks!<br>
> &gt; -Chris<br>
> &gt; songer@xxxxxxxxxxxxx<br>
> &gt; <br>
> &gt; _______________________________________________<br>
> &gt; cdt-dev mailing list<br>
> &gt; cdt-dev@xxxxxxxxxxx<br>
> &gt; <a href="http://dev.eclipse.org/mailman/listinfo/cdt-dev"; eudora="autourl">http://dev.eclipse.org/mailman/listinfo/cdt-dev</a><br>
> &gt; <br><br>
> _______________________________________________<br>
> cdt-dev mailing list<br>
> cdt-dev@xxxxxxxxxxx<br>
> <a href="http://dev.eclipse.org/mailman/listinfo/cdt-dev"; eudora="autourl">http://dev.eclipse.org/mailman/listinfo/cdt-dev</a> </blockquote></html>
> 
> --=====================_-1545104421==_.ALT--
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev
> 



Back to the top