[patch] Re: Advice on fixing gdb/12528
Jan Kratochvil
jan.kratochvil@redhat.com
Tue Mar 15 03:16:00 GMT 2011
On Mon, 14 Mar 2011 22:01:44 +0100, Paul Pluzhnikov wrote:
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ testsuite/gdb.cp/pr12528.exp 14 Mar 2011 20:52:11 -0000
I would prefer any non-numeric name of the testfile.
> +set additional_flags {-ffunction-sections -Wl,--gc-sections}
> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
> + [list debug c++ additional_flags=$additional_flags]] != "" } {
> + untested $srcfile
> + return -1
> +}
This testfile correctly breaks without the fix applied with:
g++ (GCC) 4.4.6 20110314 (prerelease)
but it gives false PASS even without the fix applied with:
g++ (GCC) 4.5.3 20110314 (prerelease)
g++ (GCC) 4.6.0 20110312 (experimental)
as recent GCCs no longer create multiple ctors in such case.
For a real testcase it should be in gdb.dwarf2/ (and then the special
compilation options are sure no longer needed).
> +if { ![runto_main] } {
> + fail "Can't run to main"
> + return
> +}
It could check the `info break' output without running the testcase at all.
Nothing important.
Thanks,
Jan
More information about the Gdb-patches
mailing list