Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing function handle_bnj_arm #1481

Open
Emiluren opened this issue Jul 8, 2024 · 8 comments
Open

Missing function handle_bnj_arm #1481

Emiluren opened this issue Jul 8, 2024 · 8 comments

Comments

@Emiluren
Copy link

Emiluren commented Jul 8, 2024

I got a crash in branch_predictor_arm.py where it tries to call handle_bnj_arm.

  [...]
  File "/home/emil/.local/lib/python3.12/site-packages/qiling/debugger/qdb/branch_predictor/branch_predictor_arm.py", line 163, in predict
    n2_addr = handle_bnj_arm(ql, next_addr)
              ^^^^^^^^^^^^^^
NameError: name 'handle_bnj_arm' is not defined

I didn't find any definition and no other use of it in the codebase. Is it an old function that has been removed?

@ucgJhe
Copy link
Collaborator

ucgJhe commented Jul 13, 2024

Hi, this function handle_bnj_arm should be predict i will try to make a fix for this, pls test it for me once done it thx

@ucgJhe
Copy link
Collaborator

ucgJhe commented Jul 13, 2024

pls test this #1483 and report it here thx

@Emiluren
Copy link
Author

Hm, I ran into a different problem when trying to test. Now qdb doesn't open for me using this:

    ql.debugger = 'qdb'
    ql.debug_stop = True

I was running on master before. Using git bisect I figured out I start having problems at 6799389

@ucgJhe
Copy link
Collaborator

ucgJhe commented Jul 16, 2024

can you provide the sample binary for fixing this ?

@Emiluren
Copy link
Author

Here is my script and the program I'm trying to run: qdb_issue.zip

My scripts runs the program until the start of main and then makes a snapshot to start faster next time. Also I run without multithread after loading the snapshot but it doesn't make a difference regarding qdb if run with it on. It only crashes with different errors, either 'NoneType' object has no attribute 'cur_thread' or illegal instruction.

@Emiluren
Copy link
Author

With qdb I was going to set a breakpoint at 0x91742baa and step once from there. That triggers the handle_bnj_arm error.

@ucgJhe
Copy link
Collaborator

ucgJhe commented Jul 20, 2024

With qdb I was going to set a breakpoint at 0x91742baa and step once from there. That triggers the handle_bnj_arm error.

hi i couldn't repro the error u got cuz a missing library error while loading shared libraries: libecore_evas.so.1: cannot open shared object file: No such file or directory

image

could you pls check again for me ?

@Emiluren
Copy link
Author

Oops, sorry. I must have accidentally tested with my snapshot file. There were a whole bunch of libs missing.

Here they are: missing_libs.tar.gz. Just put them in rootfs/lib. (This actually xz compressed to get under Github's 25 MB limit but they don't support xz files so I had to rename it...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants