-Xg flag and lineinfo/lnfodwrf support

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

-Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria
Hi to all,

is someone working on the -Xg lineinfo/lnfodwrf support, so that using
a separate .dbg file for the debug, the software is able to show the
call-stack with source line?

Another questions...

What are currently the OS that supports the -Xg flag?

--
Best regards...

Fabio Dell'Aria.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: -Xg flag and lineinfo/lnfodwrf support

Peter Vreman
> Hi to all,
>
> is someone working on the -Xg lineinfo/lnfodwrf support, so that using
> a separate .dbg file for the debug, the software is able to show the
> call-stack with source line?

Make sure you use the latest svn code. There are already a lot of things refactored regarding the
reading those units.

> Another questions...
>
> What are currently the OS that supports the -Xg flag?

For the moment Windows only and i'm looking at Linux.

Peter




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: -Xg flag and lineinfo/lnfodwrf support

Jonas Maebe-2

On 20 Jan 2008, at 13:03, Peter Vreman wrote:

>> What are currently the OS that supports the -Xg flag?
>
> For the moment Windows only and i'm looking at Linux.

Also Darwin+dwarf.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: -Xg flag and lineinfo/lnfodwrf support

Peter Vreman
In reply to this post by Fabio Dell'Aria
>> Hi to all,
>>
>> is someone working on the -Xg lineinfo/lnfodwrf support, so that using
>> a separate .dbg file for the debug, the software is able to show the
>> call-stack with source line?

Please stop working on this. I have it already working.

Peter


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: -Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria
Ok Peter,
I'm waiting for your news.


2008/1/20, Peter Vreman <[hidden email]>:

> >> Hi to all,
> >>
> >> is someone working on the -Xg lineinfo/lnfodwrf support, so that using
> >> a separate .dbg file for the debug, the software is able to show the
> >> call-stack with source line?
>
> Please stop working on this. I have it already working.
>
> Peter
>
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


--
Best regards...

Fabio Dell'Aria.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Vincent Snijders
Fabio Dell'Aria schreef:
> Ok Peter,
> I'm waiting for your news.
>

Tip: subscribe to http://svn.freepascal.org/feeds/fpcsvn.rss.

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Peter Vreman
In reply to this post by Fabio Dell'Aria
> Ok Peter,
> I'm waiting for your news.

Finished, see r9813


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria
Hi Peter,

2008/1/20, Peter Vreman <[hidden email]>:
> > Ok Peter,
> > I'm waiting for your news.
>
> Finished, see r9813

I think to have found a best method to implement -Xg flag on Linux:

To explain my method I need compare your currently method with my new.

To do this I use an example:

We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about 8Mb are Debug).

Currently you use:

objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and write 8Mb for create $DBG)
objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 10Mb from $EXE and 8Mb from $DBG, for calculate CRC32, and wrote 10Mb of modifyed $EXE)
strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to disk 2Mb of modified $EXE)

TOTAL:
Read from disk: 10+10+8+10 = 38 Mb
Write to disk : 8+10+2 = 20 Mb

--

My new method is:

mv $EXE $DBG     (read 0, write 0)
strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and write 2Mb to create stripped $EXE)
objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and write 8Mb of stripped $DBG)
objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 2Mb from $EXE and 8Mb from $DBG, for calculate CRC32, and wrote 2Mb of modifyed $EXE)

TOTAL:
Read from disk: 10+10+2+8 = 30 Mb
Write to disk : 2+8+2 = 12 Mb


As you can see using my new method is possible reduce the read access of about 20% and the write access of about the 40% (the great improvement).


What do you think about? ;)

--
Best regards...

Fabio Dell'Aria.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Peter Vreman
In reply to this post by Fabio Dell'Aria
> We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about
> 8Mb are Debug).
>
> Currently you use:
>
> objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and
> write 8Mb for create $DBG)
> objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 10Mb from $EXE and
> 8Mb from $DBG, for calculate CRC32, and wrote 10Mb of modifyed $EXE)
> strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to
> disk 2Mb of modified $EXE)
>
> TOTAL:
> Read from disk: 10+10+8+10 = 38 Mb
> Write to disk : 8+10+2 = 20 Mb
>
> --
>
> My new method is:
>
> mv $EXE $DBG     (read 0, write 0)
> strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and
> write 2Mb to create stripped $EXE)
> objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and
> write 8Mb of stripped $DBG)
> objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 2Mb from $EXE and
> 8Mb from $DBG, for calculate CRC32, and wrote 2Mb of modifyed $EXE)
>
> TOTAL:
> Read from disk: 10+10+2+8 = 30 Mb
> Write to disk : 2+8+2 = 12 Mb
>
>
> As you can see using my new method is possible reduce the read access of
> about 20% and the write access of about the 40% (the great improvement).
>
>
> What do you think about? ;)

It is just changing the order "strip --strip-unneeded" and "objcopy --add-gnu-debuglink" not the
same?



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria
Hi,

2008/1/21, Peter Vreman <[hidden email]>:

> > We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about
> > 8Mb are Debug).
> >
> > Currently you use:
> >
> > objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and
> > write 8Mb for create $DBG)
> > objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 10Mb from $EXE and
> > 8Mb from $DBG, for calculate CRC32, and wrote 10Mb of modifyed $EXE)
> > strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to
> > disk 2Mb of modified $EXE)
> >
> > TOTAL:
> > Read from disk: 10+10+8+10 = 38 Mb
> > Write to disk : 8+10+2 = 20 Mb
> >
> > --
> >
> > My new method is:
> >
> > mv $EXE $DBG     (read 0, write 0)
> > strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and
> > write 2Mb to create stripped $EXE)
> > objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and
> > write 8Mb of stripped $DBG)
> > objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 2Mb from $EXE and
> > 8Mb from $DBG, for calculate CRC32, and wrote 2Mb of modifyed $EXE)
> >
> > TOTAL:
> > Read from disk: 10+10+2+8 = 30 Mb
> > Write to disk : 2+8+2 = 12 Mb
> >
> >
> > As you can see using my new method is possible reduce the read access of
> > about 20% and the write access of about the 40% (the great improvement).
> >
> >
> > What do you think about? ;)
>
> It is just changing the order "strip --strip-unneeded" and "objcopy --add-gnu-debuglink" not the
> same?

Yes! ;)

--
Best regards...

Fabio Dell'Aria.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Re: -Xg flag and lineinfo/lnfodwrf support

Fabio Dell'Aria
In reply to this post by Peter Vreman
Hi,

2008/1/21, Peter Vreman <[hidden email]>:

> > We have a compiled file with debug info (ex: using -gl flag) of 10Mb (about
> > 8Mb are Debug).
> >
> > Currently you use:
> >
> > objcopy --only-keep-debug $EXE $DBG     (read from disk 10Mb from $EXE and
> > write 8Mb for create $DBG)
> > objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 10Mb from $EXE and
> > 8Mb from $DBG, for calculate CRC32, and wrote 10Mb of modifyed $EXE)
> > strip --strip-unneeded $EXE     (read from disk $10Mb from $EXE and write to
> > disk 2Mb of modified $EXE)
> >
> > TOTAL:
> > Read from disk: 10+10+8+10 = 38 Mb
> > Write to disk : 8+10+2 = 20 Mb
> >
> > --
> >
> > My new method is:
> >
> > mv $EXE $DBG     (read 0, write 0)
> > strip --strip-unneeded $DBG -o $EXE     (read from disk 10Mb from $DBG and
> > write 2Mb to create stripped $EXE)
> > objcopy --only-keep-debug $DBG $DBG     (read from disk 10Mb from $DBG and
> > write 8Mb of stripped $DBG)
> > objcopy --add-gnu-debuglink=$DBG $EXE     (read from disk 2Mb from $EXE and
> > 8Mb from $DBG, for calculate CRC32, and wrote 2Mb of modifyed $EXE)
> >
> > TOTAL:
> > Read from disk: 10+10+2+8 = 30 Mb
> > Write to disk : 2+8+2 = 12 Mb
> >
> >
> > As you can see using my new method is possible reduce the read access of
> > about 20% and the write access of about the 40% (the great improvement).
> >
> >
> > What do you think about? ;)
>
> It is just changing the order "strip --strip-unneeded" and "objcopy --add-gnu-debuglink" not the
> same?

Do you think to apply this change? :)

--
Best regards...

Fabio Dell'Aria.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal