* varobj.c (varobj_list_children): Stop if the number of children is
unknown. (c_number_of_children): Report no children for zero sized arrays. * lib/mi-support.exp (mi_runto_helper): Expect two prompts when continuing.
This commit is contained in:
parent
1b572db9ac
commit
74a44383f0
4 changed files with 28 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-01-04 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* varobj.c (varobj_list_children): Stop if the number of children is
|
||||||
|
unknown.
|
||||||
|
(c_number_of_children):
|
||||||
|
|
||||||
2007-01-04 Mark Kettenis <kettenis@gnu.org>
|
2007-01-04 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* alpha-tdep.c (alpha_register_name): Use ARRAY_SIZE.
|
* alpha-tdep.c (alpha_register_name): Use ARRAY_SIZE.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2007-01-04 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* lib/mi-support.exp (mi_runto_helper): Expect two prompts
|
||||||
|
when continuing.
|
||||||
|
|
||||||
2007-01-04 Pedro Alves <pedro_alves@portugalmail.pt>
|
2007-01-04 Pedro Alves <pedro_alves@portugalmail.pt>
|
||||||
|
|
||||||
* gdb.base/annota3.exp ($binfile): Append $EXEEXT.
|
* gdb.base/annota3.exp ($binfile): Append $EXEEXT.
|
||||||
|
|
|
@ -880,8 +880,17 @@ proc mi_runto_helper {func run_or_continue} {
|
||||||
if {$run_or_continue == "run"} {
|
if {$run_or_continue == "run"} {
|
||||||
mi_run_cmd
|
mi_run_cmd
|
||||||
} else {
|
} else {
|
||||||
send_gdb "000-exec-continue\n"
|
send_gdb "000-exec-continue\n"
|
||||||
|
gdb_expect {
|
||||||
|
-re "000\\^running\r\n${mi_gdb_prompt}" {
|
||||||
|
}
|
||||||
|
timeout {
|
||||||
|
fail "$test"
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re ".*000\\*stopped,thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
|
-re ".*000\\*stopped,thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
|
||||||
pass "$test"
|
pass "$test"
|
||||||
|
|
|
@ -685,6 +685,10 @@ varobj_list_children (struct varobj *var, struct varobj ***childlist)
|
||||||
if (var->num_children == -1)
|
if (var->num_children == -1)
|
||||||
var->num_children = number_of_children (var);
|
var->num_children = number_of_children (var);
|
||||||
|
|
||||||
|
/* If that failed, give up. */
|
||||||
|
if (var->num_children == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
/* If we're called when the list of children is not yet initialized,
|
/* If we're called when the list of children is not yet initialized,
|
||||||
allocate enough elements in it. */
|
allocate enough elements in it. */
|
||||||
while (VEC_length (varobj_p, var->children) < var->num_children)
|
while (VEC_length (varobj_p, var->children) < var->num_children)
|
||||||
|
@ -1711,7 +1715,9 @@ c_number_of_children (struct varobj *var)
|
||||||
&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
&& TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
|
||||||
children = TYPE_LENGTH (type) / TYPE_LENGTH (target);
|
children = TYPE_LENGTH (type) / TYPE_LENGTH (target);
|
||||||
else
|
else
|
||||||
children = -1;
|
/* If we don't know how many elements there are, don't display
|
||||||
|
any. */
|
||||||
|
children = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_STRUCT:
|
case TYPE_CODE_STRUCT:
|
||||||
|
|
Loading…
Add table
Reference in a new issue