On Friday 29 April 2016 00:09:23 Graeme Geldenhuys wrote:
> Hi Martin,
>
> Debugging FPC generated applications is lost to me. ;)  Please see
> attached screenshot. I run the app from inside MSEide, I do a couple of
> things in my application, then get a "Exception EVariantError". Normally
> my first port of call is the Stack window. But that isn't much help in
> this case. Lazarus IDE shows the exact same stacktrace output, plus it
> pops up the Assembler window.
>
> So I opened the Assembler window in MSEide as well as the CPU window.
> But now I'm lost. What does that information tell me, and more
> importantly what can I do from there to find out exactly where in my
> source code (or any 3rd party code I'm using - it's all open source
> code) the error occurred.
>
> Normally if the Stack Trace doesn't tell me much, I know what code I
> recently modified, and go look in there. But in this specific situation
> I'm totally at a loss for where to look. So maybe all these debug
> windows in MSEide could give me a clue?
>
Is 'Project'-'Options'-'Debugger'-'Stop on Excep.' activated? What shows the 
MSEide status line?

gdb can not follow the stack. First step is to compile *all* source including 
FPC RTL and FCL with debuginfo in order to help gdb to find the stack 
pointers.
I use this script for compiling:
"
#!/bin/sh
fpcdir=/home/mse/packs/standard/svn/fp/fixes_3_0
cd ${fpcdir}/rtl
make clean
cd ${fpcdir}/packages
make clean
cd ${fpcdir}
make OPT="-gl -O-" FPC=${fpcdir}/compiler/ppc386 rtl packages
cd ${fpcdir}/../mse
"
In my experience the FPC-gdb combination is more robust with STABS than DWARF 
but on 64 bit STABS is not available.

When you have a RTL with debuginfo and there still is no usable stack 
information try to set breakpoints everywhere where an EVariantError is 
raised. A 'Search in Files' with "raise evarianterror" shows them.

Martin

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to