Re: [fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread Sven Barth
Am 20.02.2012 23:37 schrieb leledumbo leledumbo_c...@yahoo.co.id:

  The resolution of file and address can only be done if your code is a)
 compiled with debug info and b) some code is available that can
 translate the debug info to the output. The first is done by -g, while
 the second is done by adding the l option. The latter adds the unit
 lineinfo or lnfodwrf depending on the debug format used by the compiler.

 I'm aware of a) and my thought for b) is that BackTraceStrFunc would do
it.
 But I got the same thing happened with Everton, the function doesn't
 translate debug info so all I get is simply addresses, without line
 information.

The BackTraceStrFunc by default points to SysBackTraceStr which just
converts addresses to strings. If you use -gl then one of the two
lineinfo units is included depending on the chosen format of the debug
info. This units in turn set BackTraceStrFunc to their own function, so
that line and file info is now part of the returned string. So the savest
way to ensure that BackTraceStrFunc returns more than just the address us
to use -gl.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread leledumbo
  So the savest way to ensure that BackTraceStrFunc returns more than just
the address us to use -gl

I think I'm not clear enough to say that I have used -gl for this, and I
don't get the line information. I've tried this on 2 places: ExceptProc and
TApplication.OnException.

--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Logging-full-runtime-error-exception-backtrace-tp5499290p5502650.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread Martin

On 21/02/2012 16:14, leledumbo wrote:

  So the savest way to ensure that BackTraceStrFunc returns more than just

the address us to use -gl

I think I'm not clear enough to say that I have used -gl for this, and I
don't get the line information. I've tried this on 2 places: ExceptProc and
TApplication.OnException.



It should be noted, that afaik if the BackTraceStrFunc encounters an 
error, it is reset to the system one (without line info). So once 
backtrace failed (maybe problems reading a particular part of the debug 
info, it switches itself off... (for all further calls)


If you don't get results: then you should mention if that was using 
stabs, or dwarf. And 32bit 64 bit.


Also start testing outside an exception, to see if that works.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread Everton Vieira

Em 21/02/2012, às 14:20, Martin escreveu:

 On 21/02/2012 16:14, leledumbo wrote:
  So the savest way to ensure that BackTraceStrFunc returns more than just
 the address us to use -gl
 
 I think I'm not clear enough to say that I have used -gl for this, and I
 don't get the line information. I've tried this on 2 places: ExceptProc and
 TApplication.OnException.
 
 
 It should be noted, that afaik if the BackTraceStrFunc encounters an error, 
 it is reset to the system one (without line info). So once backtrace failed 
 (maybe problems reading a particular part of the debug info, it switches 
 itself off... (for all further calls)
 
 If you don't get results: then you should mention if that was using stabs, or 
 dwarf. And 32bit 64 bit.

Did you have looked at the example i send? It also is not working. I`m on 32b 
mac osx lion with svn version instaled. And with none of the available options 
have worked: automatic, stabs, dwarf, dwarf2, dwarf3 beta.

 
 Also start testing outside an exception, to see if that works.
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread Martin

On 21/02/2012 20:28, Everton Vieira wrote:

Em 21/02/2012, às 14:20, Martin escreveu:


On 21/02/2012 16:14, leledumbo wrote:

  So the savest way to ensure that BackTraceStrFunc returns more than just

the address us to use -gl

I think I'm not clear enough to say that I have used -gl for this, and I
don't get the line information. I've tried this on 2 places: ExceptProc and
TApplication.OnException.


It should be noted, that afaik if the BackTraceStrFunc encounters an error, it 
is reset to the system one (without line info). So once backtrace failed (maybe 
problems reading a particular part of the debug info, it switches itself off... 
(for all further calls)

If you don't get results: then you should mention if that was using stabs, or 
dwarf. And 32bit 64 bit.

Did you have looked at the example i send? It also is not working. I`m on 32b 
mac osx lion with svn version instaled. And with none of the available options 
have worked: automatic, stabs, dwarf, dwarf2, dwarf3 beta.


Well then maybe there is a bug on Mac.

It does work for me on windows (and IIRC I also had success on Linux) 
both 32 bit.




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-21 Thread Everton Vieira

Em 21/02/2012, às 18:35, Martin escreveu:

 On 21/02/2012 20:28, Everton Vieira wrote:
 Em 21/02/2012, às 14:20, Martin escreveu:
 
 On 21/02/2012 16:14, leledumbo wrote:
  So the savest way to ensure that BackTraceStrFunc returns more than just
 the address us to use -gl
 
 I think I'm not clear enough to say that I have used -gl for this, and I
 don't get the line information. I've tried this on 2 places: ExceptProc and
 TApplication.OnException.
 
 It should be noted, that afaik if the BackTraceStrFunc encounters an error, 
 it is reset to the system one (without line info). So once backtrace failed 
 (maybe problems reading a particular part of the debug info, it switches 
 itself off... (for all further calls)
 
 If you don't get results: then you should mention if that was using stabs, 
 or dwarf. And 32bit 64 bit.
 Did you have looked at the example i send? It also is not working. I`m on 
 32b mac osx lion with svn version instaled. And with none of the available 
 options have worked: automatic, stabs, dwarf, dwarf2, dwarf3 beta.
 
 Well then maybe there is a bug on Mac.
 
 It does work for me on windows (and IIRC I also had success on Linux) both 32 
 bit.

I have a virtualized windows xp here. I`ll try there.

 
 
 
 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-20 Thread leledumbo
 I use this units to do that. Was someone with the nickname crhonos who
made.

Thanks, I'll try it :)

--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Logging-full-runtime-error-exception-backtrace-tp5499290p5500483.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Logging full runtime-error/exception backtrace

2012-02-20 Thread leledumbo
 The resolution of file and address can only be done if your code is a) 
compiled with debug info and b) some code is available that can 
translate the debug info to the output. The first is done by -g, while 
the second is done by adding the l option. The latter adds the unit 
lineinfo or lnfodwrf depending on the debug format used by the compiler. 

I'm aware of a) and my thought for b) is that BackTraceStrFunc would do it.
But I got the same thing happened with Everton, the function doesn't
translate debug info so all I get is simply addresses, without line
information.

--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Logging-full-runtime-error-exception-backtrace-tp5499290p5500488.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal