Commit e4900e35 authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

New upstream version 0.4.1

parent 8897fbe8
Pipeline #6655 failed with stages
[binaries]
c = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang'
cpp = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang++'
ar = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-as'
ranlib = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib'
ld = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld'
strip = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip'
c = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang'
cpp = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang++'
ar = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-as'
ranlib = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib'
ld = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld'
strip = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip'
pkgconfig = 'false'
[properties]
sys_root = '/usr/local/lib/android/sdk/ndk-bundle/sysroot'
sys_root = '${ANDROID_NDK}/sysroot'
[host_machine]
system = 'android'
......
[binaries]
c = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi28-clang'
cpp = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi28-clang++'
ar = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as'
ranlib = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib'
ld = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld'
strip = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip'
c = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi33-clang'
cpp = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi33-clang++'
ar = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as'
ranlib = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib'
ld = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld'
strip = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip'
pkgconfig = 'false'
[properties]
sys_root = '/usr/local/lib/android/sdk/ndk-bundle/sysroot'
sys_root = '${ANDROID_NDK}/sysroot'
[host_machine]
system = 'android'
......
[binaries]
c = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang'
cpp = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang++'
ar = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-as'
ranlib = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-ranlib'
ld = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-ld'
strip = '/usr/local/lib/android/sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-strip'
c = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android33-clang'
cpp = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android33-clang++'
ar = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
as = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-as'
ranlib = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-ranlib'
ld = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-ld'
strip = '${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-strip'
pkgconfig = 'false'
[properties]
sys_root = '/usr/local/lib/android/sdk/ndk-bundle/sysroot'
sys_root = '${ANDROID_NDK}/sysroot'
[host_machine]
system = 'android'
......
......@@ -193,7 +193,7 @@ jobs:
- name: Build with Meson
if: matrix.build_system == 'meson' && matrix.enabled
run: |
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
if [ "$ASAN" == "true" ]; then
export CFLAGS="-DASAN=1 ${CFLAGS}"
fi
......@@ -206,7 +206,7 @@ jobs:
if: matrix.build_system == 'meson' && matrix.enabled
run: |
# Install the rizin
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
ninja -C build install
......@@ -220,7 +220,7 @@ jobs:
continue-on-error: ${{ matrix.allow_failure }}
if: matrix.build_system == 'meson' && matrix.enabled
run: |
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
if [ "$ASAN" == "true" ]; then
......@@ -252,7 +252,7 @@ jobs:
if: matrix.run_tests && matrix.enabled
run: |
# Running the test suite
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
if [ "$ASAN" == "true" ]; then
......@@ -405,7 +405,7 @@ jobs:
name: Build on gcc 11
if: contains(github.head_ref, 'dist') || contains(github.head_ref, 'gcc11') || contains(github.ref, 'release-') || github.ref == 'refs/heads/stable' || github.event_name == 'schedule'
runs-on: ubuntu-latest
container: ubuntu:hirsute
container: ubuntu:jammy
steps:
- name: Set timezone to UTC
run: ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo 'UTC' > /etc/timezone
......@@ -546,7 +546,7 @@ jobs:
tar -C rizin --strip-components=1 -xvf rizin-src.tar.xz
- name: Install rizin
run: |
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
meson --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install
working-directory: rizin
- name: Check that installed rizin runs
......@@ -649,6 +649,7 @@ jobs:
- name: Compile with meson
run: |
export PATH=${HOME}/.local/bin:${PATH}
sed -i 's@\${ANDROID_NDK}@'"${ANDROID_NDK}"'@' .github/meson-android-${{ matrix.name }}.ini
meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dportable=true -Dblob=true -Dstatic_runtime=true build --cross-file .github/meson-android-${{ matrix.name }}.ini
ninja -C build && ninja -C build install
- name: Create rizin-android-${{ matrix.name }}.tar.gz
......@@ -674,17 +675,17 @@ jobs:
run: sudo pip3 install meson ninja PyYAML
- name: Compile & Install Rizin
run: |
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
meson --buildtype release --prefix=/usr build
ninja -C build && sudo ninja -C build install
- name: Compile C++ test
run: |
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
meson --prefix=/usr build-cpp-test ./test/unit/cpp
meson compile -C build-cpp-test
- name: Run C++ test
run: |
export PATH=${HOME}/bin:${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/bin:${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
meson test -C build-cpp-test --print-errorlogs
# build-extras:
......
......@@ -25,7 +25,7 @@ jobs:
- name: Install meson and ninja
run: |
sudo pip3 install meson ninja PyYAML
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
- name: Initialize CodeQL - cpp
if: matrix.name == 'CodeQL-cpp'
......
......@@ -114,12 +114,12 @@ jobs:
- name: Run black
run: |
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
find . -name "*.py" | grep -v "subprojects" | xargs black --check
- name: Run pylint
run: |
export PATH=${HOME}/Library/Python/3.8/bin:${HOME}/Library/Python/3.9/bin:${HOME}/.local/bin:${PATH}
export PATH=${HOME}/Library/Python/3.9/bin:${HOME}/Library/Python/3.10/bin:${HOME}/.local/bin:${PATH}
find . -name "*.py" | grep -v "subprojects" | grep -v "librz/bin/format/xnu/scripts/" | xargs pylint
licenses:
......
......@@ -91,10 +91,6 @@ Files: test/notworking_db/*
Copyright: 2009 RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: test/Makefile
Copyright: 2009 RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: test/.gitignore
Copyright: 2009 RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
......@@ -163,10 +159,6 @@ Files: librz/syscall/d2/*
Copyright: 2018 RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: pkgcfg/*.pc.acr
Copyright: 2009 RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: subprojects/*.wrap
Copyright: 2021 RizinOrg <info@rizin.re>
License: LGPL-3.0-only
......@@ -179,38 +171,14 @@ Files: test/unit/rz_test_cmd_test
Copyright: 2021 RizinOrg <info@rizin.re>
License: LGPL-3.0-only
Files: librz/asm/arch/avr/README
Copyright: RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/asm/arch/ppc/README
Copyright: RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/asm/arch/*/gnu/*
Copyright: 1989-2021 Free Software Foundation, Inc.
License: GPL-2.0-or-later
Files: librz/bp/README
Copyright: RadareOrg <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/egg/README
Copyright: pancake <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/include/sflib/*
Copyright: 2004 Philippe Biondi <phil@secdev.org>
License: GPL-2.0-only
Files: librz/io/README
Copyright: pancake <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/magic/README
Copyright: pancake <pancake@nopcode.org>
License: LGPL-3.0-only
Files: librz/magic/*
Copyright: 1986-1995 Ian F. Darwin
Copyright: 1995-present Christos Zoulas and others
......
platform: darwin/arm64
pipeline:
build:
image: /bin/bash
commands:
- meson build --prefix="`pwd`/prefix"
- ninja -C build
- ninja -C build install
fetch-testbins:
image: /bin/bash
commands:
- cd test
- git clone --depth=1 https://github.com/rizinorg/rizin-testbins bins
unit-test:
image: /bin/bash
commands:
- ninja -C build test
rz-test:
image: /bin/bash
commands:
- export PATH="`pwd`/prefix/bin:$PATH"
- cd test
- rz-test -L
......@@ -200,6 +200,10 @@ int sum = 0; // set sum to 0
* Use our [shellcheck.sh](https://github.com/rizinorg/rizin/blob/master/sys/shellcheck.sh) script to check for problems and for bashisms
### Python Scripts
* Code must run under Python 3.6 (for [Debian "wheezy" compatibility](https://github.com/rizinorg/rizin/pull/2870#issuecomment-1205338140)).
# Manage Endianness
As hackers, we need to be aware of endianness.
......
......@@ -35,7 +35,7 @@ FROM debian:10
# rz-pipe python version
ARG RZ_PIPE_PY_VERSION=master
# rz-ghidra version
ARG RZ_GHIDRA_VERSION=dev
ARG RZ_GHIDRA_VERSION=stable
ARG with_arm32_as
ARG with_arm64_as
......
......@@ -30,15 +30,35 @@ anywhere because Rizin is compiled in a "portable" way, allowing moving the
whole directory anywhere.
## MacOS
On MacOS systems, Rizin can be installed through .pkg files attached to the
On MacOS systems you can install Rizin in one of three ways.
Bear in mind the formula offered by Homebrew and the port offered by MacPorts
are not provided by Rizin: they are offered and actively maintained and updated
by their respective communities. Rizin *might* help with maintenance and fixes
in a punctual fashion, but it cannot guarantee these two installation methods
offer the latest available version.
You can always find the latest version in the package offered on the GitHub
release.
### Homebrew
Rizin offers a Homebrew [formula](https://formulae.brew.sh/formula/rizin)
through which you can install Rizin with a single command:
brew install rizin
### MacPorts
Rizin offers a MacPorts [port](https://ports.macports.org/port/rizin/) too.
We can leverage it by running:
sudo port install rizin
### Package file
Rizin can also be installed through .pkg files attached to the
GitHub release at https://github.com/rizinorg/rizin/releases/.
It is named as `rizin-macos-<version>.pkg`.
If you would like to help us configure an homebrew tap for Rizin, please get in
touch! We would love to make the process of installing and keeping Rizin updated
as easy as possible for all our users.
## Android
Statically compiled binaries for some common architectures where Android runs
are compiled and attached to all releases. We currently support aarch64, arm,
......@@ -52,5 +72,5 @@ anywhere.
## Others
If you are interested in providing Rizin in your distribution/system or in
adding support for other distribution formats (e.g. snap, homebrew, etc.),
please let us know and we would be glad to help you.
\ No newline at end of file
adding support for other distribution formats (e.g. snap, flatpak, etc.),
please let us know and we would be glad to help you.
......@@ -24,7 +24,7 @@
.Sh DESCRIPTION
This program is part of the rizin project.
.Pp
Rahash2 allows you to calculate, check and show the hash values of each block of a target file. The block size is 32768 bytes by default. It's allowed to hash from stdin using '-' as a target file. You can compare against a known hash and get the result in the exit status.
rz-hash allows you to calculate, check and show the hash values of each block of a target file. The block size is 32768 bytes by default. It's allowed to hash from stdin using '-' as a target file. You can compare against a known hash and get the result in the exit status.
.Pp
You can hash big files by hashing each block and later determine what part of it has been modified. Useful for filesystem analysis.
.Pp
......
......@@ -4,6 +4,7 @@ Priority: optional
Maintainer: RizinOrg <info@rizin.re>
Build-Depends: debhelper (>= 12),
meson,
ninja-build,
pkg-config,
python3,
python3-setuptools,
......
......@@ -2,13 +2,13 @@ Format: 1.0
Source: rizin
Binary: rizin, librizin-dev, rizin-common
Architecture: any all
Version: 0.3.0-1
Version: 0.4.0-1
Maintainer: RizinOrg <info@rizin.re>
Homepage: https://rizin.re/
Standards-Version: 4.5.1
Vcs-Browser: https://github.com/rizinorg/rizin
Vcs-Git: https://github.com/rizinorg/rizin
Build-Depends: debhelper (>= 12), meson (>= 0.55.0), pkg-config, python3, python3-setuptools
Build-Depends: debhelper (>= 12), meson (>= 0.55.0), ninja-build, pkg-config, python3, python3-setuptools
Package-List:
rizin deb devel optional arch=any
rizin-common deb devel optional arch=all
......
......@@ -7,6 +7,7 @@ VCS: https://github.com/rizinorg/rizin
%global gituser rizinorg
%global gitname rizin
%global rel 1
%global shortversion %(c=%{version}; echo ${c} | cut -d'.' -f-2)
Release: 0%{rel}%{?dist}
Source0: https://github.com/%{gituser}/%{gitname}/releases/download/v%{version}/%{name}-src-v%{version}.tar.xz
......@@ -92,6 +93,7 @@ information
%license COPYING COPYING.LESSER
%{_bindir}/r*
%{_libdir}/librz_*.so.%{version}*
%{_libdir}/librz_*.so.%{shortversion}
%{_mandir}/man1/rizin.1.*
%{_mandir}/man1/rz*.1.*
%{_mandir}/man7/rz-esil.7.*
......
......@@ -88,7 +88,7 @@ foreach(_comp ${Rizin_FIND_COMPONENTS})
set(Rizin_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
return()
endif()
if (rz_${_comp_lower}_FOUND)
if (TARGET "Rizin::${_comp}")
# Already got this component, trying to re-add the
# target below would be an error
continue()
......
......@@ -2,7 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-only
#include <rz_analysis.h>
#include <capstone.h>
#include <capstone/capstone.h>
#include "arm_cs.h"
......
......@@ -2365,12 +2365,12 @@ static RzILOpEffect *avr_il_push(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis
static RzILOpEffect *avr_il_rcall(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis *analysis) {
// PC = PC + k + 1
st32 k = (st16)aop->param[0];
st16 k = (st16)aop->param[0];
RzILOpPure *val, *num;
RzILOpEffect *jmp, *push, *sub;
jmp = avr_il_jump_relative(aop, analysis, k);
jmp = avr_il_jump_relative(aop, analysis, pc + k);
val = VARG(AVR_SP);
val = AVR_ADDR(val);
......@@ -2412,9 +2412,9 @@ static RzILOpEffect *avr_il_ret(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis
static RzILOpEffect *avr_il_rjmp(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis *analysis) {
// PC = PC + k + 1
st32 k = (st16)aop->param[0];
st16 k = (st16)aop->param[0];
return avr_il_jump_relative(aop, analysis, k);
return avr_il_jump_relative(aop, analysis, pc + k);
}
static RzILOpEffect *avr_il_rol(AVROp *aop, AVROp *next_op, ut64 pc, RzAnalysis *analysis) {
......
......@@ -1239,13 +1239,15 @@ static st32 parse_function_args_and_vars(Context *ctx, ut64 idx, RzStrBuf *args,
const RzBinDwarfAttrValue *val = &child_die->attr_values[i];
switch (val->attr_name) {
case DW_AT_name:
if (!get_linkage_name || !has_linkage_name) {
if ((!get_linkage_name || !has_linkage_name) && val->kind == DW_AT_KIND_STRING) {
name = val->string.content;
}
break;
case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name:
name = val->string.content;
if (val->kind == DW_AT_KIND_STRING) {
name = val->string.content;
}
has_linkage_name = true;
break;
case DW_AT_type:
......
......@@ -120,7 +120,7 @@ static void _6502_analysis_esil_get_addr_pattern1(RzAnalysisOp *op, const ut8 *d
break;
case 0x01: // op ($ff,x)
op->cycles = 6;
imm = data[1];
imm = (len > 1) ? data[1] : 0;
if (esiladdr_out) {
snprintf(esiladdr_out, esiladdr_size, "x,0x%02x,+,[2]", (unsigned int)imm);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment