Skip to content

Build and Debug Active File on macOS using (real) gcc/g++, shows no instructions in Disassembly view #8009

@Colengms

Description

@Colengms

Repro:

  • On Intel-based macOS
  • Use a simple 'hello world'
  • Place a breakpoint
  • Use Build and Debug Active File to generate a tasks.json file - select a real version of g++ (specifically installed on the system, and not a fake gcc/g++ that points to Apple's Clang. i.e. brew install gcc. Be sure to install gdb as well.)
  • After hitting the breakpoint, open the Disassembly view. I see:

image

Andrew suggested this is due to our debug config provider specifying LLDB, whereas GDB is needed for (real) gcc/g++.

It would seem necessary to determine whether the compiler requires LLDB or GDB using something more than just the compiler name. Whether a compiler is clang or not could be determined by querying it to see if certain defines are present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions