* [PATCH] return errors from varobj_get_value
@ 2002-01-14 18:18 Keith Seitz
0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2002-01-14 18:18 UTC (permalink / raw)
To: Insight Maling List
Hi,
Ever notice that errors in the variable windows are not printed in the
window? That's because we never put them there!
This patch fixes variable_value so that when an error occurs, the error
string gets shoved into tcl so that the variable windows will use it.
Keith
ChangeLog
2002-01-14 Keith Seitz <keiths@redhat.com>
* generic/gdbtk-varobj.c (variable_value): When varobj_get_value
fails, use error_last_message to return the error to tcl land.
This allows us to display nice messages about why "0xdeadbeef" is
not accessible!
Patch
Index: generic/gdbtk-varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-varobj.c,v
retrieving revision 1.10
diff -p -r1.10 gdbtk-varobj.c
*** generic/gdbtk-varobj.c 2001/11/05 19:42:48 1.10
--- generic/gdbtk-varobj.c 2002/01/15 02:14:51
*************** variable_value (interp, objc, objv, var)
*** 609,615 ****
r = varobj_get_value (var);
if (r == NULL)
! return TCL_ERROR;
else
{
Tcl_SetObjResult (interp, Tcl_NewStringObj (r, -1));
--- 609,620 ----
r = varobj_get_value (var);
if (r == NULL)
! {
! char *err = error_last_message ();
! gdbtk_set_result (interp, "%s", err);
! xfree (err);
! return TCL_ERROR;
! }
else
{
Tcl_SetObjResult (interp, Tcl_NewStringObj (r, -1));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-15 2:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-14 18:18 [PATCH] return errors from varobj_get_value Keith Seitz
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).