* [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure
@ 2009-09-16 9:49 Pierre Muller
2009-09-16 16:31 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Muller @ 2009-09-16 9:49 UTC (permalink / raw)
To: insight
Checked in as obvious fix
to fix build failure using
mi/mi-cmd-var.c code as model.
Pierre Muller
Pascal language support maintainer for GDB
gdb/gdbtk ChangeLog entry
2009-09-16 Pierre Muller <muller@ics.u-strasbg.fr>
* generic/gdbtk-varobj.c (variable_children): Adapt to
varobj_list_children function change.
Index: generic/gdbtk-varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-varobj.c,v
retrieving revision 1.23
diff -u -p -r1.23 gdbtk-varobj.c
--- generic/gdbtk-varobj.c 6 Apr 2009 23:11:10 -0000 1.23
+++ generic/gdbtk-varobj.c 16 Sep 2009 09:44:38 -0000
@@ -416,13 +416,13 @@ variable_children (Tcl_Interp *interp, s
VEC(varobj_p) *children;
struct varobj *child;
char *childname;
- int ix;
+ int ix, from, to;
list = Tcl_NewListObj (0, NULL);
- children = varobj_list_children (var);
+ children = varobj_list_children (var, &from, &to);
- for (ix = 0; VEC_iterate (varobj_p, children, ix, child); ++ix)
+ for (ix = from; ix < to && VEC_iterate (varobj_p, children, ix, child);
++ix
{
childname = varobj_get_objname (child);
/* Add child to result list and install the Tcl command for it. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure
2009-09-16 9:49 [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure Pierre Muller
@ 2009-09-16 16:31 ` Tom Tromey
2009-09-17 7:04 ` Pierre Muller
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2009-09-16 16:31 UTC (permalink / raw)
To: Pierre Muller; +Cc: insight
>>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
Pierre> + int ix, from, to;
Pierre> list = Tcl_NewListObj (0, NULL);
Pierre> - children = varobj_list_children (var);
Pierre> + children = varobj_list_children (var, &from, &to);
You have to initialize from and to first -- they are in/out parameters.
-1 is the correct initial value to use.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure
2009-09-16 16:31 ` Tom Tromey
@ 2009-09-17 7:04 ` Pierre Muller
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Muller @ 2009-09-17 7:04 UTC (permalink / raw)
To: 'Tom Tromey'; +Cc: insight
Thanks for catching that error, Tom.
I still checked that one also as obvious,
despite the fact that my error probably means that
I was wrong to consider it as obvious in the first place :(
Pierre Muller
Pascal language support maintainer for GDB
2009-09-17 Pierre Muller <muller@ics.u-strasbg.fr>
* generic/gdbtk-varobj.c (variable_children): Initialize new locals
used in varobj_list_children function call.
Index: generic/gdbtk-varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-varobj.c,v
retrieving revision 1.24
diff -u -p -r1.24 gdbtk-varobj.c
--- generic/gdbtk-varobj.c 16 Sep 2009 09:46:58 -0000 1.24
+++ generic/gdbtk-varobj.c 17 Sep 2009 06:59:31 -0000
@@ -420,6 +420,9 @@ variable_children (Tcl_Interp *interp, s
list = Tcl_NewListObj (0, NULL);
+ from = -1;
+ to = -1;
+
children = varobj_list_children (var, &from, &to);
for (ix = from; ix < to && VEC_iterate (varobj_p, children, ix, child);
++ix)
> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Tom Tromey
> Envoyé : Wednesday, September 16, 2009 6:32 PM
> À : Pierre Muller
> Cc : insight@sourceware.org
> Objet : Re: [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure
>
> >>>>> "Pierre" == Pierre Muller <muller@ics.u-strasbg.fr> writes:
>
> Pierre> + int ix, from, to;
>
> Pierre> list = Tcl_NewListObj (0, NULL);
>
> Pierre> - children = varobj_list_children (var);
> Pierre> + children = varobj_list_children (var, &from, &to);
>
> You have to initialize from and to first -- they are in/out parameters.
> -1 is the correct initial value to use.
>
> Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-17 7:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 9:49 [OBV] Fix gdbtk/generic/gdbtk-varobj.c compilation failure Pierre Muller
2009-09-16 16:31 ` Tom Tromey
2009-09-17 7:04 ` Pierre Muller
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).