This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb.base/print-file-var.exp false PASS [Re: [RFA] choose symbol from given block's objfile first.]


On Wed, 09 May 2012 23:48:56 +0200, Joel Brobecker wrote:
> +++ b/gdb/testsuite/gdb.base/print-file-var-lib1.c
[..]
> +int this_version_id = 104;
> +
> +int
> +get_version_1 (void)
> +{
> +  return this_version_id;
> +}
[...]
> +++ b/gdb/testsuite/gdb.base/print-file-var-lib2.c
[...]
> +int this_version_id = 203;
> +
> +int
> +get_version_2 (void)
> +{
> +  return this_version_id;
> +}
[...]
> +++ b/gdb/testsuite/gdb.base/print-file-var-main.c
[...]
> +int
> +main (void)
> +{
> +  if (get_version_1 () != 104)
> +    return 1;
> +  if (get_version_2 () != 104)
> +    return 2;
> +  return 0;
> +}
[...]
> +++ b/gdb/testsuite/gdb.base/print-file-var.exp
[...]
> +gdb_test "print 'print-file-var-lib1.c'::this_version_id" \
> +         " = 104"
> +
> +gdb_test "print 'print-file-var-lib2.c'::this_version_id" \
> +         " = 203"

This testcase proves GDB behaves incorrectly - if the code sees 104 in both
cases then GDB should also print 104 in both cases.  I am curious why did you
check it in when you have proven yourself the regression.


Regards,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]