This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

Re: [archer-keiths-expr-cumulative] Symbol scope resolving error


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


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