lldb not stoping on my breakpoint -


I have created a clag program from sources of complete debugging information (the default build type for clang IIUC), I check The debug info module has compilation units, keeping it in viewable in view:

  $ lldb / opt / bin / clang ++ (lldb) script lldb.target.module [/ Opt / bin / clang ++ '] GetNumCompileUnits () 1341  

I used a file in the clag source tree, with lib / Sema / SemaExpr.cpp with Sema :: DiagnoseAssignmentResult There is a printf statement in the method (which is in my copy at line 10853) I know that this method is called on my test file test.cc , but I Debugger can not be found to stop the breakpoint! I tried to set breakpoints in two ways,

  $ lldb / opt / bin / clang ++ (lldb) breakpoint set-m diagnostic assurance breakpoint 2: Where = clang ++ `clang :: Sema :: DiagnoseAssignmentResult (Clang :: Sema :: AssignConvertType, clang :: SourceLocation, clang :: QualType, clang :: QualType, clang :: Expr *, clang :: sema :: assignmentAction, bool *) + 87 SemaExpr .cpp: 10858, Address = 0x0000000100ab9947 (LLDB) Process Launch - ./test.cc & lt; & Lt; Message from my printf statement & gt; & Gt; ... then <+> << code>   done   

< / Pre>

Find the right place in the source code, but it can not be stopped when passed through the method. I also tried to set the breakpoint by specifying the file and line number,

  breakpoint set -f cmxpropy-l 10853 breakpoint 3: where = clag ++ `clag :: sama :: DiagnoseAssignmentResult (clang :: Sema :: AssignConvertType, clang :: SourceLocation, clang :: QualType, clang :: QualType, clang :: Expr *, clang :: sema :: assignment action, bool *) + 87 SemaExpr.cpp : 10858, Address = 0x0000000100ab9947  

It was "worked" again, but can not stop Do I do something fundamental wrong here? How can I trigger breakpoints?

You are debugging the claude driver, which is not actually parsing, instead, clag one Prepares to compile the other process, then need to add LDD, etc. The LLDB was not stopping at its breakpoint because the code was actually being run by a hair process, it is confusing here that the driver and the parser actually use the same binary, the breakpoint only version of that earring Did not take the code that was going to implement that code.

How to debug the compilation part of the clang is to run it first:

  $ clang ++ - ### & lt; All your other logic & gt; Strange Attention - ### Logic does not tell you to compile the condom, but to throw the command line that it will run to compile. This will look like this:  
  / usr / bin / clang "" -cc1 "...  

So that's the command line you want To use the lldb to debug the clag as a compiler instead of a quarrel as a compiler driver ...


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -