Skip to content

[gdb] Support 'typename' parameter to LookupGlobalSymbol or equivalent #54

Closed
@cbiesinger

Description

@cbiesinger

The typename is used to disambiguate global symbols and is used in ax-tree.js which is trying to access a function-local variable named "instance" (https://cs.chromium.org/chromium/src/ui/accessibility/ax_tree_manager_map.cc?sq=package:chromium&g=0&l=13):

namespace ui {
[...]
AXTreeManagerMap& AXTreeManagerMap::GetInstance() {
  static base::NoDestructor<AXTreeManagerMap> instance;

On Windows, "instance" gets looked up without qualifier and is thus ambiguous, and gets disambiguated by type.

On GDB, it could get looked up like this:

(gdb) p 'ui::AXTreeManagerMap::GetInstance()'::instance
$1 = {
  storage_ = '\000' <repeats 39 times>
}

Need to figure out how to best implement this. Perhaps re-purposing the namespace argument wouldn't be too bad? Or else need to find a way to iterate over global symbols and match them by type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions