Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6236499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:51:54+00:00 2026-05-24T10:51:54+00:00

I want to do the analysis of debug information of C++ code. As I

  • 0

I want to do the analysis of debug information of C++ code.
As I understand, Clang should be able to handle C++.

I tried clang myFile.cpp.
But I get

clang: error: unable to execute command: program not executable
clang error: linker command failed due to signal 1 (use -v to see invocation).

After setting the path for llvm-ld, it partially works. I mean, if I perform

clang C:myFile.cpp -S -emit-llvm -o -

it outputs some information. But it still fails for clang myFile.cpp with error

clang version 2.9 (tags/RELEASE_29/final)
Target: i686-pc-win32
Thread model: posix
 "C:/FrontEnd/llvm/bin/Debug/clang.exe" -cc1 -triple i686-pc-win32 -emit-obj -mrelax-all -disable-free -main-file-name BinarySearch_Kernels.cpp -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -momit-leaf-frame-pointer -v -resource-dir C:/FrontEnd/l
lvm/bin/Debug\..\lib\clang\2.9 -ferror-limit 19 -fmessage-length 280 -fcxx-exceptions -fexceptions -fms-extensions -fmsc-version=1300 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o C:/Users/ilipov/AppData/Local/Temp/cc-563130.o -x c++ C:\clang\BinarySearch_Kernels
.cpp
clang -cc1 version 2.9 based upon llvm 2.9 hosted on i686-pc-win32
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"
  #include "..." search starts here:
  #include <...> search starts here:
 C:/FrontEnd/llvm/bin/Debug/../lib/clang/2.9/include
 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
 C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\\include
End of search list.
 "link.exe" -out:a.out -defaultlib:libcmt -nologo C:/Users/ilipov/AppData/Local/Temp/cc-563130.o
clang: error: unable to execute command: program not executable
clang: error: linker command failed due to signal 1 (use -v to see invocation)

Any case, I want to get as full debug information as possible

For example, for

class stamBase
{
public:
    int get1(){return 2;};
    int get0(){return 0;}
};
class stamDer : public stamBase
{
public:
    int get1(){return 1;}
};
void func()
{
    stamDer d;
    int x = d.get1();
}

I get

target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i686-pc-win32"
%class.stamDer = type { i8 }
define void @_Z4funcv() {
entry:
  %d = alloca %class.stamDer, align 1
  %x = alloca i32, align 4
  %call = call i32 @_ZN7stamDer4get1Ev(%class.stamDer* %d)
  store i32 %call, i32* %x, align 4
  ret void
}
define linkonce_odr i32 @_ZN7stamDer4get1Ev(%class.stamDer* %this) nounwind align 2 {
entry:
  %this.addr = alloca %class.stamDer*, align 4
  store %class.stamDer* %this, %class.stamDer** %this.addr, align 4
  %this1 = load %class.stamDer** %this.addr
  ret i32 1
}

From my investigation of Clang debug information code, I thought that I should get the information for stamBase too!

How can I run Clang correctly for accepting full debug information and preventing Clang errors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:51:54+00:00Added an answer on May 24, 2026 at 10:51 am

    I think you need to install a linker. GNU ld will be fine; you should be able to install it via your package manager.

    There also is an LLVM linker. It is less popular, but it would run out of the box with Clang once installed (just add it to the PATH a rerun clang).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use sonar for analysis but i can't get any data in
We want to do some fairly simple analysis of user's C++ code and then
I have several Code Analysis CA1704:IdentifiersShouldBeSpelledCorrectly warnings that I want to suppress. Basically, they
I want to do some analysis on some old code and need to be
I want to run a static code analysis over my Rails app. Is there
I have setup Sonar and want to run the code analysis as part of
So I started using FlexPMD for static code analysis, and I want to add
I want to use Latent Semantic Analysis for a small app I'm building, but
There must be simple way, I do not want to run Code Analysis separately
I want to run some code coverage analysis (using CoverStory) on our iPhone app's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.