This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Insight crashing when debugging invalid pointers


Hi,

I'm using a cross insight built from recent CVS snapshot (10242005)
[host=cygwin, target=arm-linux]

Insight is running quite fine, but I experience some troubles when insight tries
to display variables with invalid memory references...

For example :

typedef struct {
    int a;
    int b;
} TEST_STRUCT;

TEST_STRUCT pt;
int         sum;

pt = NULL;
sum = pt->a + pt->b;

This code will obviously fail (if memory address 0 is not accessible on target)
!!!
But it is only an example ...

If you stop execution at line 'sum = pt->a + pt->b'
Using the GDB console :
p pt
gives -> $1 (TEST_STRUCT *) 0x0
p pt->a
gives -> Error: Cannot access Memory at address 0x0

But if insight is trying to display the same things (either using tooltips or
watch), the entire Insight is crashing !!!

I thing it is related variable evaluation like {$val value}
I checked the Insight scripts, all calls to {$val value} are secured with
'catch'.
Is "catch {$val value} result" supposed to catch GDB exceptions ???

I wonder if this behavior is specific to my built/target or more generic ...

This is very annoying, because when stepping, your mouse can go over over an
expression where pointers are not yet initialized. Insight then tries to
display variable value in tooltips and this leads to frequent Insight
crashes...

Thanks,
Elmer.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]