<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>This is generally the right approach, yes.</p>
    <p>You may also find include/llvm/Object/StackMapParser.h helpful.</p>
    <p>Philip<br>
    </p>
    <div class="moz-cite-prefix">On 5/12/21 2:52 AM, Kavindu Gimhan
      Zoysa wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALoJghVU9i4KU8BGmF6WB0MEdTgmWjcRKoTbqzLS7M-k-0r-kg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">This is what I followed. <a
href="https://stackoverflow.com/questions/8045108/use-label-in-assembly-from-c"
          moz-do-not-send="true">https://stackoverflow.com/questions/8045108/use-label-in-assembly-from-c</a>
        <div><br clear="all">
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div>Kavindu Gimhan Zoysa,</div>
                      <div>BSc(Hons) | ENTC | UoM,<br>
                      </div>
                      <div dir="ltr">SSE | WSO2
                        <div><br>
                        </div>
                        <div><a href="https://github.com/KavinduZoysa"
                            target="_blank" moz-do-not-send="true">GitHub</a> <a
href="https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/"
                            target="_blank" moz-do-not-send="true">LinkedIn</a> <a
href="https://medium.com/@kavindugimhanzoysa" target="_blank"
                            moz-do-not-send="true">Medium</a></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, 12 May 2021 at 12:45,
          Kavindu Gimhan Zoysa <<a href="mailto:kavindu175@gmail.com"
            moz-do-not-send="true">kavindu175@gmail.com</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hi all,</div>
            <div><br>
            </div>
            <div>I was able to generate the Stack Map which is shown
              here <a
                href="https://llvm.org/docs/StackMaps.html#stack-map-format"
                target="_blank" moz-do-not-send="true">https://llvm.org/docs/StackMaps.html#stack-map-format</a>.
              Now I want to read those entries. What I did was, I
              manually change the .s file as shown below (Added the <b>.globl
                __LLVM_StackMaps </b>manually). Then I can read the
              entries using C code.  </div>
            <div><br>
            </div>
            <div>
              <div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-size:15px;line-height:20px;white-space:pre-wrap"><div><span style="color:rgb(86,156,214)">.globl</span> __LLVM_StackMaps </div><div><span style="color:rgb(220,220,170)">__LLVM_StackMaps:</span></div><div>    <span style="color:rgb(86,156,214)">.byte</span>   <span style="color:rgb(181,206,168)">3</span></div><div>    <span style="color:rgb(86,156,214)">.byte</span>   <span style="color:rgb(181,206,168)">0</span></div><div>    <span style="color:rgb(86,156,214)">.</span>short  <span style="color:rgb(181,206,168)">0</span></div></div>
            </div>
            <div><br>
            </div>
            <div>I want to know, whether this is the correct approach.
              If not could you please suggest me the correct approach?</div>
            <div><br>
            </div>
            <div>Really appreciate your input on this.</div>
            <div><br>
            </div>
            <div>Thank you,</div>
            <div>Kavindu</div>
            <br clear="all">
            <div>
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div>Kavindu Gimhan Zoysa,</div>
                        <div>BSc(Hons) | ENTC | UoM,<br>
                        </div>
                        <div dir="ltr">SSE | WSO2
                          <div><br>
                          </div>
                          <div><a href="https://github.com/KavinduZoysa"
                              target="_blank" moz-do-not-send="true">GitHub</a> <a
href="https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/"
                              target="_blank" moz-do-not-send="true">LinkedIn</a> <a
href="https://medium.com/@kavindugimhanzoysa" target="_blank"
                              moz-do-not-send="true">Medium</a></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>