Re: [fpc-pascal] Re: -Xg flag and lineinfo/lnfodwrf support

2008-01-21 Thread Fabio Dell'Aria
Hi Peter,

2008/1/20, Peter Vreman [EMAIL PROTECTED]:
  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  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: -Xg flag and lineinfo/lnfodwrf support

2008-01-21 Thread Fabio Dell'Aria
Hi,

2008/1/21, Peter Vreman [EMAIL PROTECTED]:
  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  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: -Xg flag and lineinfo/lnfodwrf support

2008-01-21 Thread Fabio Dell'Aria
Hi,

2008/1/21, Peter Vreman [EMAIL PROTECTED]:
  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  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] -Xg flag and lineinfo/lnfodwrf support

2008-01-20 Thread 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  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: -Xg flag and lineinfo/lnfodwrf support

2008-01-20 Thread Fabio Dell'Aria
Ok Peter,
I'm waiting for your news.


2008/1/20, Peter Vreman [EMAIL PROTECTED]:
  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  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal



-- 
Best regards...

Fabio Dell'Aria.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal