qilingframework / qilingframework/qiling

QlArchARM object has no attribute unicorn_exception_handler during ARM Cortex-M emulation

Open
#1,478 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.1k
Forks
798
Avg merge
1d 1h
Merged PRs (30d)
9

Description

Describe the bug
When attempting to emulate a bare-metal ARM program for Cortex-M using Qiling, the following error occurs: AttributeError: 'QlArchARM' object has no attribute 'unicorn_exception_handler'.

Sample Code

from qiling import Qiling
from qiling.const import *

ELF_FILE_PATH = "my-application.axf"
ROOT_FS_PATH = "./rootfs"

ql = Qiling([ELF_FILE_PATH], ROOT_FS_PATH, archtype=QL_ARCH.ARM, ostype=QL_OS.MCU, verbose=QL_VERBOSE.DEBUG)
ql.run()

Expected behavior
The Qiling emulator should successfully initialize and run the provided ARM Cortex-M ELF file without raising an AttributeError.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

  • Qiling version: 1.4.6
  • Python version: 3.10.12
  • Operating System: Ubuntu 22.04.4 LTS - x86_64
  • Detailed error message: AttributeError: 'QlArchARM' object has no attribute 'unicorn_exception_handler'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the provided Qiling(...) configuration for the ARM Cortex-M ELF, then start at ql.run() and trace ARM MCU initialization to the missing unicorn_exception_handler. Done means the sample initializes and runs without this AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.