public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [archer-keiths-expr-cumulative] Symbol scope resolving error
@ 2009-03-23 18:31 Jan Kratochvil
  2009-03-23 18:46 ` Sami Wagiaalla
  2009-04-29 16:18 ` Sami Wagiaalla
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kratochvil @ 2009-03-23 18:31 UTC (permalink / raw)
  To: Sami Wagiaalla; +Cc: archer

Hi,

while DWARF from current HEAD or Fedora GCCs is broken:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524

fixed GCC IMO provides correct DWARF but GDB from
archer-keiths-expr-cumulative (tested
35ca449e9f1a4cd477df644f717bbe4e3362c486) still does not resolve it correctly
(see below).

Tested GDB with GCC patched by the fix
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524#c1
scratch-built as:
  http://koji.fedoraproject.org/scratch/jkratoch/task_1253951/


Thanks for the fix,
Jan


# gdb -q ./outer
(gdb) l 1
1       #include <stdlib.h>
2
3       namespace A
4         {
5           static int var = 2;
6         }
7
8       int
9       main (void)
10      {
11        int var = 1;
12      
13        if (var != 1)         /* var-is-1 */
14          abort ();
15      
16        {
17          using A::var;
18      
19          if (var != 2)       /* var-is-2 */
20            abort ();
21        }
22      
23        return 0;             /* break-here */
24      }
(gdb) b 13
Breakpoint 1 at 0x4005a7: file outer.C, line 13.
(gdb) r
Starting program: /tmp/outer 

Breakpoint 1, main () at outer.C:13
13        if (var != 1)         /* var-is-1 */
(gdb) p var
$1 = 1
(gdb) adv 19
main () at outer.C:19
19          if (var != 2)       /* var-is-2 */
(gdb) p var
$2 = 1
^^^^^^ Wrong GDB evaluation.
(gdb) adv 23
main () at outer.C:23
23        return 0;             /* break-here */
(gdb) q

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [archer-keiths-expr-cumulative] Symbol scope resolving error
  2009-03-23 18:31 [archer-keiths-expr-cumulative] Symbol scope resolving error Jan Kratochvil
@ 2009-03-23 18:46 ` Sami Wagiaalla
  2009-03-27 19:33   ` Sami Wagiaalla
  2009-04-29 16:18 ` Sami Wagiaalla
  1 sibling, 1 reply; 5+ messages in thread
From: Sami Wagiaalla @ 2009-03-23 18:46 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: archer

Patch is almost ready :) :

Breakpoint 1 at 0x4005a6: file bz39524.c, line 19.

Breakpoint 1, main () at bz39524.c:19
19	    if (var != 2)       /* var-is-2 */
Current language:  auto; currently c++
$1 = 2

Sami

Jan Kratochvil wrote:
> Hi,
> 
> while DWARF from current HEAD or Fedora GCCs is broken:
>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524
> 
> fixed GCC IMO provides correct DWARF but GDB from
> archer-keiths-expr-cumulative (tested
> 35ca449e9f1a4cd477df644f717bbe4e3362c486) still does not resolve it correctly
> (see below).
> 
> Tested GDB with GCC patched by the fix
>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524#c1
> scratch-built as:
>   http://koji.fedoraproject.org/scratch/jkratoch/task_1253951/
> 
> 
> Thanks for the fix,
> Jan
> 
> 
> # gdb -q ./outer
> (gdb) l 1
> 1       #include <stdlib.h>
> 2
> 3       namespace A
> 4         {
> 5           static int var = 2;
> 6         }
> 7
> 8       int
> 9       main (void)
> 10      {
> 11        int var = 1;
> 12      
> 13        if (var != 1)         /* var-is-1 */
> 14          abort ();
> 15      
> 16        {
> 17          using A::var;
> 18      
> 19          if (var != 2)       /* var-is-2 */
> 20            abort ();
> 21        }
> 22      
> 23        return 0;             /* break-here */
> 24      }
> (gdb) b 13
> Breakpoint 1 at 0x4005a7: file outer.C, line 13.
> (gdb) r
> Starting program: /tmp/outer 
> 
> Breakpoint 1, main () at outer.C:13
> 13        if (var != 1)         /* var-is-1 */
> (gdb) p var
> $1 = 1
> (gdb) adv 19
> main () at outer.C:19
> 19          if (var != 2)       /* var-is-2 */
> (gdb) p var
> $2 = 1
> ^^^^^^ Wrong GDB evaluation.
> (gdb) adv 23
> main () at outer.C:23
> 23        return 0;             /* break-here */
> (gdb) q

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [archer-keiths-expr-cumulative] Symbol scope resolving error
  2009-03-23 18:46 ` Sami Wagiaalla
@ 2009-03-27 19:33   ` Sami Wagiaalla
  0 siblings, 0 replies; 5+ messages in thread
From: Sami Wagiaalla @ 2009-03-27 19:33 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: archer

Hi Jan,

I have committed this fix: 3ebbd04cee427232781580ec88e5d1ea854d1012

Sami

Sami Wagiaalla wrote:
> Patch is almost ready :) :
> 
> Breakpoint 1 at 0x4005a6: file bz39524.c, line 19.
> 
> Breakpoint 1, main () at bz39524.c:19
> 19        if (var != 2)       /* var-is-2 */
> Current language:  auto; currently c++
> $1 = 2
> 
> Sami
> 
> Jan Kratochvil wrote:
>> Hi,
>>
>> while DWARF from current HEAD or Fedora GCCs is broken:
>>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524
>>
>> fixed GCC IMO provides correct DWARF but GDB from
>> archer-keiths-expr-cumulative (tested
>> 35ca449e9f1a4cd477df644f717bbe4e3362c486) still does not resolve it 
>> correctly
>> (see below).
>>
>> Tested GDB with GCC patched by the fix
>>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524#c1
>> scratch-built as:
>>   http://koji.fedoraproject.org/scratch/jkratoch/task_1253951/
>>
>>
>> Thanks for the fix,
>> Jan
>>
>>
>> # gdb -q ./outer
>> (gdb) l 1
>> 1       #include <stdlib.h>
>> 2
>> 3       namespace A
>> 4         {
>> 5           static int var = 2;
>> 6         }
>> 7
>> 8       int
>> 9       main (void)
>> 10      {
>> 11        int var = 1;
>> 12      13        if (var != 1)         /* var-is-1 */
>> 14          abort ();
>> 15      16        {
>> 17          using A::var;
>> 18      19          if (var != 2)       /* var-is-2 */
>> 20            abort ();
>> 21        }
>> 22      23        return 0;             /* break-here */
>> 24      }
>> (gdb) b 13
>> Breakpoint 1 at 0x4005a7: file outer.C, line 13.
>> (gdb) r
>> Starting program: /tmp/outer
>> Breakpoint 1, main () at outer.C:13
>> 13        if (var != 1)         /* var-is-1 */
>> (gdb) p var
>> $1 = 1
>> (gdb) adv 19
>> main () at outer.C:19
>> 19          if (var != 2)       /* var-is-2 */
>> (gdb) p var
>> $2 = 1
>> ^^^^^^ Wrong GDB evaluation.
>> (gdb) adv 23
>> main () at outer.C:23
>> 23        return 0;             /* break-here */
>> (gdb) q
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [archer-keiths-expr-cumulative] Symbol scope resolving error
  2009-03-23 18:31 [archer-keiths-expr-cumulative] Symbol scope resolving error Jan Kratochvil
  2009-03-23 18:46 ` Sami Wagiaalla
@ 2009-04-29 16:18 ` Sami Wagiaalla
  2009-04-30 14:33   ` Jan Kratochvil
  1 sibling, 1 reply; 5+ messages in thread
From: Sami Wagiaalla @ 2009-04-29 16:18 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: archer

Hi Jan,

This should be fixed by:

f95071be91b43bb9b86137d058a3e0482c75abdb

Test are here:

8b84e7646a4477255feeb532cb52512ed0945e83
937e9fbc48c56b61efa7a85cc478b13f0d042110
e8b9d38e528f9686912cb938de49f70824af9fe5

Sorry for the late reply, but after rolling back the first version of
this patch, I ran into a lot of issues with it.

Maybe this can go into an update. Let me know what you think.

Thanks,
   Sami

Jan Kratochvil wrote:
> Hi,
> 
> while DWARF from current HEAD or Fedora GCCs is broken:
>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524
> 
> fixed GCC IMO provides correct DWARF but GDB from
> archer-keiths-expr-cumulative (tested
> 35ca449e9f1a4cd477df644f717bbe4e3362c486) still does not resolve it correctly
> (see below).
> 
> Tested GDB with GCC patched by the fix
>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39524#c1
> scratch-built as:
>   http://koji.fedoraproject.org/scratch/jkratoch/task_1253951/
> 
> 
> Thanks for the fix,
> Jan
> 
> 
> # gdb -q ./outer
> (gdb) l 1
> 1       #include <stdlib.h>
> 2
> 3       namespace A
> 4         {
> 5           static int var = 2;
> 6         }
> 7
> 8       int
> 9       main (void)
> 10      {
> 11        int var = 1;
> 12      
> 13        if (var != 1)         /* var-is-1 */
> 14          abort ();
> 15      
> 16        {
> 17          using A::var;
> 18      
> 19          if (var != 2)       /* var-is-2 */
> 20            abort ();
> 21        }
> 22      
> 23        return 0;             /* break-here */
> 24      }
> (gdb) b 13
> Breakpoint 1 at 0x4005a7: file outer.C, line 13.
> (gdb) r
> Starting program: /tmp/outer 
> 
> Breakpoint 1, main () at outer.C:13
> 13        if (var != 1)         /* var-is-1 */
> (gdb) p var
> $1 = 1
> (gdb) adv 19
> main () at outer.C:19
> 19          if (var != 2)       /* var-is-2 */
> (gdb) p var
> $2 = 1
> ^^^^^^ Wrong GDB evaluation.
> (gdb) adv 23
> main () at outer.C:23
> 23        return 0;             /* break-here */
> (gdb) q

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [archer-keiths-expr-cumulative] Symbol scope resolving error
  2009-04-29 16:18 ` Sami Wagiaalla
@ 2009-04-30 14:33   ` Jan Kratochvil
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2009-04-30 14:33 UTC (permalink / raw)
  To: Sami Wagiaalla; +Cc: archer

Hi Sami,

On Wed, 29 Apr 2009 18:17:50 +0200, Sami Wagiaalla wrote:
> This should be fixed by:
> f95071be91b43bb9b86137d058a3e0482c75abdb

at least on F11.x86_64 gdb.cp/exception.exp (+some others) now crash for me on
archer-keiths-expr-cumulative HEAD (e8b9d38e528f9686912cb938de49f70824af9fe5).


> Maybe this can go into an update. Let me know what you think.

Besides it needs some fixes IMO it is a new feature (sure a behavior bugfix
but from the GDB standpoint considering it a feature) and thus it just missed
the F11 boat and it will be great rather for F12.  Moreover the patch does not
seem to me as an obviously simple / regression safe to got for a Fedora update.

Which version RHEL-6 will be derived from I do not currently know + it is too
offtopic on this list.


Regards,
Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-30 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 18:31 [archer-keiths-expr-cumulative] Symbol scope resolving error Jan Kratochvil
2009-03-23 18:46 ` Sami Wagiaalla
2009-03-27 19:33   ` Sami Wagiaalla
2009-04-29 16:18 ` Sami Wagiaalla
2009-04-30 14:33   ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).