Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-01

-Xg flag and lineinfo/lnfodwrf support

11 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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.
Peter Vreman
Show quoted text 5 lines
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

Peter Vreman
Show quoted text 5 lines
> 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

Fabio Dell'Aria
to Peter Vreman

Ok Peter,
I'm waiting for your news.

2008/1/20, Peter Vreman :

Show quoted text 15 lines
>> 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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Best regards... Fabio Dell'Aria.
Fabio Dell'Aria
to Peter Vreman

Hi Peter,

2008/1/20, Peter Vreman :

> 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.
Peter Vreman
Show quoted text 38 lines
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?

Fabio Dell'Aria
to Peter Vreman

Hi,

2008/1/21, Peter Vreman :

Show quoted text 41 lines
> 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.
Fabio Dell'Aria
to Peter Vreman: It is just changing the order "strip --strip-unneeded" and "objcopy --add-gnu-debuglink"…

Hi,

2008/1/21, Peter Vreman :

Show quoted text 41 lines
> 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.