public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: elmer.elmer@free.fr
To: insight@sourceware.org
Subject: Insight crashing when debugging invalid pointers
Date: Fri, 18 Nov 2005 10:52:00 -0000	[thread overview]
Message-ID: <1132311131.437db25b30ca0@imp2-g19.free.fr> (raw)


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.




             reply	other threads:[~2005-11-18 10:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 10:52 elmer.elmer [this message]
2005-11-18 22:36 ` Keith Seitz
2005-11-21 11:53   ` elmer
2006-01-23  0:23   ` Insight won't let me use the source any more Bruce Korb
2006-01-23  0:27     ` Bruce Korb
2006-01-23  2:43     ` Vale Group
2006-01-23  7:27       ` Bruce Korb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1132311131.437db25b30ca0@imp2-g19.free.fr \
    --to=elmer.elmer@free.fr \
    --cc=insight@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).