diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-01 20:19:04 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-01 20:19:04 +0000 |
commit | 3d50dd94cb60adbb423659378bb9d758381959a2 (patch) | |
tree | 57833ba4f7654479cdeecd4f05ab34933acde8cc /gdb/testsuite | |
parent | dcf9f4ab7f00dba719a501c8bca3ff446edd200d (diff) | |
download | gdb-3d50dd94cb60adbb423659378bb9d758381959a2.zip gdb-3d50dd94cb60adbb423659378bb9d758381959a2.tar.gz gdb-3d50dd94cb60adbb423659378bb9d758381959a2.tar.bz2 |
gdb/
Stop on first linespec terminator instead of eating what we can.
* linespec.c (is_linespec_boundary): New function.
(name_end): Remove function.
(keep_name_info): New parameter on_boundary, replace the body.
(decode_line_1): Provide the parameter to keep_name_info.
(decode_compound): Likewise. Drop the trailing java return type
handling. Twice.
gdb/testsuite/
Stop on first linespec terminator instead of eating what we can.
* gdb.cp/minsym-fallback-main.cc (main): Call also C::operator ().
* gdb.cp/minsym-fallback.cc (C::operator ()): Define.
* gdb.cp/minsym-fallback.exp (break 'C::f()'): Change to ...
(break C::f()): ... this one.
(break C::operator()()): New test.
* gdb.cp/minsym-fallback.h (C::operator ()): Declare.
* gdb.java/jmisc.exp (break jmisc.main(java.lang.String[])int): New
test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/minsym-fallback-main.cc | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/minsym-fallback.cc | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/minsym-fallback.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/minsym-fallback.h | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.java/jmisc.exp | 4 |
6 files changed, 26 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ee88fc2..a0ecba7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,17 @@ 2011-07-01 Jan Kratochvil <jan.kratochvil@redhat.com> + Stop on first linespec terminator instead of eating what we can. + * gdb.cp/minsym-fallback-main.cc (main): Call also C::operator (). + * gdb.cp/minsym-fallback.cc (C::operator ()): Define. + * gdb.cp/minsym-fallback.exp (break 'C::f()'): Change to ... + (break C::f()): ... this one. + (break C::operator()()): New test. + * gdb.cp/minsym-fallback.h (C::operator ()): Declare. + * gdb.java/jmisc.exp (break jmisc.main(java.lang.String[])int): New + test. + +2011-07-01 Jan Kratochvil <jan.kratochvil@redhat.com> + Fall back linespec to minimal symbols. * gdb.base/psymtab.exp (Don't search past end of psymtab.): Update the error message. diff --git a/gdb/testsuite/gdb.cp/minsym-fallback-main.cc b/gdb/testsuite/gdb.cp/minsym-fallback-main.cc index a82adef..d2a677b 100644 --- a/gdb/testsuite/gdb.cp/minsym-fallback-main.cc +++ b/gdb/testsuite/gdb.cp/minsym-fallback-main.cc @@ -23,4 +23,5 @@ int main () { c.f (); + c (); } diff --git a/gdb/testsuite/gdb.cp/minsym-fallback.cc b/gdb/testsuite/gdb.cp/minsym-fallback.cc index 1ecd289..1231f7d 100644 --- a/gdb/testsuite/gdb.cp/minsym-fallback.cc +++ b/gdb/testsuite/gdb.cp/minsym-fallback.cc @@ -21,3 +21,8 @@ void C::f () { } + +void +C::operator () () +{ +} diff --git a/gdb/testsuite/gdb.cp/minsym-fallback.exp b/gdb/testsuite/gdb.cp/minsym-fallback.exp index df95a2d..2006545 100644 --- a/gdb/testsuite/gdb.cp/minsym-fallback.exp +++ b/gdb/testsuite/gdb.cp/minsym-fallback.exp @@ -35,4 +35,6 @@ clean_restart ${executable} gdb_test_no_output "set breakpoint pending off" -gdb_test "break 'C::f()'" {Breakpoint [0-9]+ at 0x[0-9a-f]+} +gdb_test "break C::f()" {Breakpoint [0-9]+ at 0x[0-9a-f]+} + +gdb_test "break C::operator()()" {Breakpoint [0-9]+ at 0x[0-9a-f]+} diff --git a/gdb/testsuite/gdb.cp/minsym-fallback.h b/gdb/testsuite/gdb.cp/minsym-fallback.h index db32e45..88bcb5c 100644 --- a/gdb/testsuite/gdb.cp/minsym-fallback.h +++ b/gdb/testsuite/gdb.cp/minsym-fallback.h @@ -19,4 +19,5 @@ class C { public: static void f (); + void operator () (); }; diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp index 2a95617..47a740c 100644 --- a/gdb/testsuite/gdb.java/jmisc.exp +++ b/gdb/testsuite/gdb.java/jmisc.exp @@ -104,4 +104,8 @@ if [set_lang_java] then { } } } + + # Test a non-mathing return type really fails the look up. + gdb_test_no_output "set breakpoint pending off" + gdb_test {break jmisc.main(java.lang.String[])int} {Function "jmisc\.main\(java\.lang\.String\[\]\)int" not defined\.} } |