* gdb.mi/var-cmd.c (do_locals_tests): Define lcharacter as a
two-char array. * gdb.mi/mi-var-cmd.exp, gdb.mi/mi2-var-cmd.exp: Use lcharacter[0].
This commit is contained in:
parent
e2a83dd0ec
commit
fef8a650d0
4 changed files with 13 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-10-01 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
|
* gdb.mi/var-cmd.c (do_locals_tests): Define lcharacter as a
|
||||||
|
two-char array.
|
||||||
|
* gdb.mi/mi-var-cmd.exp, gdb.mi/mi2-var-cmd.exp: Use lcharacter[0].
|
||||||
|
|
||||||
2007-09-30 Daniel Jacobowitz <dan@codesourcery.com>
|
2007-09-30 Daniel Jacobowitz <dan@codesourcery.com>
|
||||||
|
|
||||||
* gdb.threads/watchthreads.c (thread_function): Sleep between
|
* gdb.threads/watchthreads.c (thread_function): Sleep between
|
||||||
|
|
|
@ -86,7 +86,7 @@ mi_gdb_test "-var-create lpinteger * lpinteger" \
|
||||||
"\\^done,name=\"lpinteger\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
|
"\\^done,name=\"lpinteger\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
|
||||||
"create local variable lpinteger"
|
"create local variable lpinteger"
|
||||||
|
|
||||||
mi_gdb_test "-var-create lcharacter * lcharacter" \
|
mi_gdb_test "-var-create lcharacter * lcharacter\[0\]" \
|
||||||
"\\^done,name=\"lcharacter\",numchild=\"0\",value=\".*\",type=\"char\"" \
|
"\\^done,name=\"lcharacter\",numchild=\"0\",value=\".*\",type=\"char\"" \
|
||||||
"create local variable lcharacter "
|
"create local variable lcharacter "
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ mi_gdb_test "-var-create lpinteger * lpinteger" \
|
||||||
"\\^done,name=\"lpinteger\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
|
"\\^done,name=\"lpinteger\",numchild=\"1\",value=\"$hex\",type=\"int \\*\"" \
|
||||||
"create local variable lpinteger"
|
"create local variable lpinteger"
|
||||||
|
|
||||||
mi_gdb_test "-var-create lcharacter * lcharacter" \
|
mi_gdb_test "-var-create lcharacter * lcharacter\[0\]" \
|
||||||
"\\^done,name=\"lcharacter\",numchild=\"0\",value=\".*\",type=\"char\"" \
|
"\\^done,name=\"lcharacter\",numchild=\"0\",value=\".*\",type=\"char\"" \
|
||||||
"create local variable lcharacter "
|
"create local variable lcharacter "
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ do_locals_tests ()
|
||||||
{
|
{
|
||||||
int linteger = 0;
|
int linteger = 0;
|
||||||
int *lpinteger = 0;
|
int *lpinteger = 0;
|
||||||
char lcharacter = 0;
|
char lcharacter[2] = { 0, 0 };
|
||||||
char *lpcharacter = 0;
|
char *lpcharacter = 0;
|
||||||
long llong = 0;
|
long llong = 0;
|
||||||
long *lplong = 0;
|
long *lplong = 0;
|
||||||
|
@ -129,8 +129,8 @@ do_locals_tests ()
|
||||||
/* Simple assignments */
|
/* Simple assignments */
|
||||||
linteger = 1234;
|
linteger = 1234;
|
||||||
lpinteger = &linteger;
|
lpinteger = &linteger;
|
||||||
lcharacter = 'a';
|
lcharacter[0] = 'a';
|
||||||
lpcharacter = &lcharacter;
|
lpcharacter = lcharacter;
|
||||||
llong = 2121L;
|
llong = 2121L;
|
||||||
lplong = &llong;
|
lplong = &llong;
|
||||||
lfloat = 2.1;
|
lfloat = 2.1;
|
||||||
|
@ -141,13 +141,13 @@ do_locals_tests ()
|
||||||
lsimple.unsigned_integer = 255;
|
lsimple.unsigned_integer = 255;
|
||||||
lsimple.character = 'a';
|
lsimple.character = 'a';
|
||||||
lsimple.signed_character = 21;
|
lsimple.signed_character = 21;
|
||||||
lsimple.char_ptr = &lcharacter;
|
lsimple.char_ptr = lcharacter;
|
||||||
lpsimple = &lsimple;
|
lpsimple = &lsimple;
|
||||||
func = nothing;
|
func = nothing;
|
||||||
|
|
||||||
/* Check pointers */
|
/* Check pointers */
|
||||||
linteger = 4321;
|
linteger = 4321;
|
||||||
lcharacter = 'b';
|
lcharacter[0] = 'b';
|
||||||
llong = 1212L;
|
llong = 1212L;
|
||||||
lfloat = 1.2;
|
lfloat = 1.2;
|
||||||
ldouble = 5.498548281828172;
|
ldouble = 5.498548281828172;
|
||||||
|
|
Loading…
Reference in a new issue