From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B9D95385840F; Fri, 24 Feb 2023 17:27:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9D95385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677259655; bh=AzwZkJO1PFXJdw8nhWsCUefdZ/jjL3xfLZZeHoX5Pvk=; h=From:To:Subject:Date:From; b=yjaDNF56DEuJOc7hdZ7hXQIPWuP1KFNofvqFNvGQNCeT4NBt6OmMmMN6lWlicZ6VO Eiyt34CdCktbzIVeVrdd/+f6e2BURfq4qwt2LdK8KMHFMuCTy6jDV1QsR7NjhgA2uN X5okLy16VdZ5CQ/scivdhUpnenXCnT3qkEkcRwaM= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30164] New: Restructure symbol domains Date: Fri, 24 Feb 2023 17:27:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30164 Bug ID: 30164 Summary: Restructure symbol domains Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- Right now, symbol domains generally follow C. That is, there is a domain for tags, some for non-C things (Fortran stuff), a domain for labels, and then VAR_DOMAIN for everything else -- types, functions, variables. This leads to bad results, like bug #30158, where an attempt to look up a function instead finds a namespace. I think it would be better to drastically overhaul this code. There should be many more domains, as many as we think we'll need. Types, variables, and functions should all be separate. Probably namespaces should also be their own thing. Then, the symbol lookup functions should accept an enum flag type of all the domains that should be searched. This way, the C parser can implement its own semantics by searching the relevant C domains -- but other language parsers can do as they like. --=20 You are receiving this mail because: You are on the CC list for the bug.=