diff options
author | Tom Tromey <tromey@redhat.com> | 2010-08-18 19:02:34 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-08-18 19:02:34 +0000 |
commit | c92817ce8d63df3e3c7225d77723f1c4ae725f58 (patch) | |
tree | e7c50f7d6f489add476f812346cb7006f0347146 /gdb/testsuite/gdb.base/completion.exp | |
parent | 55455f8927ff9d4703d844163ef51b6e26cdef9e (diff) | |
download | gdb-c92817ce8d63df3e3c7225d77723f1c4ae725f58.zip gdb-c92817ce8d63df3e3c7225d77723f1c4ae725f58.tar.gz gdb-c92817ce8d63df3e3c7225d77723f1c4ae725f58.tar.bz2 |
gdb
PR symtab/11919:
* gdbtypes.c (lookup_struct_elt_type): Clean up error emission.
* parse.c (parse_field_expression): Use RETURN_MASK_ERROR. Move
name-copying lower. Document exception behavior.
* completer.c (expression_completer): Catch exceptions from
parse_field_expression.
gdb/testsuite
PR symtab/11919:
* gdb.base/completion.exp: Add test.
Diffstat (limited to 'gdb/testsuite/gdb.base/completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 5c91631..1f7c214 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -827,23 +827,8 @@ gdb_expect { timeout { fail "(timeout) complete 'set follow-fork-mode'" } } -send_gdb "p values\[0\].nonex.\t" -gdb_expect { - -re "Type struct some_struct has no component named nonex.\r\n$gdb_prompt $"\ - { pass "Completing non-existing component" } - -re ".*$gdb_prompt $" { fail "Completing non-existing component" } - timeout { fail "(timeout) Completing non-existing component" } - eof { fail "(eof) Completing non-existing component #2" } - } -# Double memory freeing gets found only on the second run: -send_gdb "p values\[0\].nonex.\t" -gdb_expect { - -re "Type struct some_struct has no component named nonex.\r\n$gdb_prompt $"\ - { pass "Completing non-existing component #2" } - -re ".*$gdb_prompt $" { fail "Completing non-existing component #2" } - timeout { fail "(timeout) Completing non-existing component #2" } - eof { fail "(eof) Completing non-existing component #2" } - } +gdb_test_no_output "complete print values\[0\].x." \ + "field completion with invalid field" # If there is a non-deprecated completion, it should be returned. gdb_test "complete sav" "save" "test non-deprecated completion" |