Giter VIP home page Giter VIP logo

Comments (8)

spacewander avatar spacewander commented on July 27, 2024

And lj-gc-objs.sxx also suffered from the same problem:
https://github.com/openresty/stapxx/blob/a6fe7b0c86b1e3dc9db4ce11fddc84242bc5216e/tapset/luajit.sxx#L306

from openresty-gdb-utils.

agentzh avatar agentzh commented on July 27, 2024

@spacewander Seems like you can just rename k64 to k64p in that Python code line. Will you try it out on your side? Thanks!

from openresty-gdb-utils.

spacewander avatar spacewander commented on July 27, 2024

@agentzh
I am afraid it doesn't work...
The recent version of LuaJIT doesn't use K64Array any more.

These two commits indicate that LuaJIT stores 64bit constants in ir instead of K64Array:

commit 9e99ccc360bc9784ebe5ce29d5fa2c72acfc5777
Author: Mike Pall <mike>
Date:   2016-05-23 00:27:51 +0200

    Strip out old infrastructure for 64 bit constants.

    Contributed by Peter Cawley.

commit 7fb75ccc4cf17825c1c8fe9f44ebfb0668a1b033
Author: Mike Pall <mike>
Date:   2016-05-23 00:25:29 +0200

    Embed 64 bit constants directly in the IR, using two slots.

    Contributed by Peter Cawley.

It seems we don't need to count 64-bit constants for the recent version of LuaJIT.

Maybe we could just use a try...except to separate affected code? Just like this:

def get_jit_state_sz(self, J):
        sz = 0

        try:
            # list of 64-bit constants
            k = mref(J['k64'], "K64Array")
            print(k)
            len = 0;
            while k:
                len += 1
                k = mref(k['next'], "K64Array")
            sz = typ("K64Array").sizeof * len
        except gdb.error:
            pass

from openresty-gdb-utils.

agentzh avatar agentzh commented on July 27, 2024

@yangshuxin Will you please shed some light on this? Thanks!

from openresty-gdb-utils.

yangshuxin avatar yangshuxin commented on July 27, 2024

@agentzh , I will. ASAP

from openresty-gdb-utils.

agentzh avatar agentzh commented on July 27, 2024

@spacewander I think this is fixed in #12. Please confirm.

from openresty-gdb-utils.

spacewander avatar spacewander commented on July 27, 2024

@agentzh
It works. And now it's time to update openresty/stapxx#31 😄

from openresty-gdb-utils.

agentzh avatar agentzh commented on July 27, 2024

@spacewander Patches welcome!

from openresty-gdb-utils.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.