This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] pass varobj errors
- From: Keith Seitz <keiths at redhat dot com>
- To: Insight Maling List <insight at sources dot redhat dot com>
- Date: Tue, 15 Jan 2002 11:18:23 -0800 (PST)
- Subject: [PATCH] pass varobj errors
Hi,
I seem to recall having posted this before, but just in case...
Keith
ChangeLog
2002-01-15 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!
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
*** gdbtk-varobj.c 2001/11/05 19:42:48 1.10
--- gdbtk-varobj.c 2002/01/15 19:13:29
*************** 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));