From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [cagney_convert-20030606-branch] Add value to REGISTER_TO_VALUE et.al.
Date: Mon, 09 Jun 2003 14:38:00 -0000 [thread overview]
Message-ID: <3EE49BE0.4070001@redhat.com> (raw)
In-Reply-To: <200306090935.h599ZLbJ000452@elgar.kettenis.dyndns.org>
> Anyway, the question of what to do when the register's value can't be
> found has been largely ignored. I'm thinking that throwing an error
> would be a safer strategy - there is too much code ignoring register
> fetches and I don't think we're going to be auditing it soon.
>
> Indeed, GDB depends on the frame unwinder always returning a value for
> its registers. However for the sake of printing variables stored in
> registers it seems that setting OPTIMIZED_OUT makes sense if we know
> for certain that a the register has been thrashed. It makes
> valprint.c:value_print() print "<value optimized out>". The problem
> with printing an error message from REGISTER_TO_VALUE() is keeping the
> error messages uniform. However, in some cases it might be more
> appropriate to print a warning instead of an error, for example if the
> register hasn't been saved, but if we cannot tell whether it has been
> thrashed yet.
>
> However, I can live with the current status quo.
Well, the status quo is that GDB doesn't have a story :-( GDB throws an
error for some values (memory read failures), returns bogus values for
others (register not available), and sets optimized out for more.
As a pie in the sky, would printing better messages help, vis:
<optimized out>
or
<register r10 unavailable>
or
<memory error at 0x1234>
or
<register r11 invalid>
What of the user interface, should it expect to be able to catch such
errors?
Andrew
next prev parent reply other threads:[~2003-06-09 14:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-04 19:38 [wip/rfc] Merge REGISTER_TO_VALUE and REGISTER_TO_TYPE Andrew Cagney
2003-06-04 21:45 ` Mark Kettenis
2003-06-04 23:05 ` Andrew Cagney
2003-06-06 18:12 ` [cagney_convert-20030606-branch] Add value to REGISTER_TO_VALUE et.al Andrew Cagney
2003-06-08 16:43 ` Mark Kettenis
2003-06-08 17:15 ` Andrew Cagney
2003-06-08 22:11 ` Andrew Cagney
2003-06-08 22:51 ` Mark Kettenis
2003-06-09 0:22 ` Andrew Cagney
2003-06-09 9:35 ` Mark Kettenis
2003-06-09 14:38 ` Andrew Cagney [this message]
2003-06-09 9:38 ` Mark Kettenis
2003-06-09 14:20 ` Andrew Cagney
2003-06-09 17:43 ` Mark Kettenis
2003-06-09 10:26 ` Mark Kettenis
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=3EE49BE0.4070001@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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