radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.66k stars 3k forks source link

Unable to store binaries with non-simple project save #10541

Open SpenserStyles opened 6 years ago

SpenserStyles commented 6 years ago

I am using Radare to analyze STM32 code. I load the binary and then create maps for the RAM and peripherals regions. When I save the project it clears the file.path and file.lastpath preventing the binary from being saved with the project when prj.files is true. This affects Cutter since the project when saved as non-simple project no longer has a path to the binary and fails to create the memory map regions.

So I have two issues:

  1. Radare is not able to save binary to project directory for non-simple saves
  2. Cutter does not have file path for non-simple saves

I can workaround radare issue just fine but not sure about the cutter issue

Work environment

Questions Answers
MAC/arch/bits (mandatory) macOS v10.13.5 64-bit
File format of the file you reverse (mandatory) bin
Architecture/bits of the file (mandatory) arm / 16
r2 -v full output, not truncated (mandatory) radare2 2.7.0-git 18495 @ darwin-x86-64 git.2.6.0-317-g129c0a6dc commit: 129c0a6dcc011b92817f2e5aae3cd8713b6205ac build: 2018-06-20__06:42:5

Expected behavior

Radare: Allow binary to be saved with project Cutter: Allow loading of non-simple projects with memory maps

Actual behavior

Steps to reproduce the behavior

r2 -a arm -b 16 test.bin
omb 1 0x8000000
omr 1 0x80000
o malloc://0x20000 0x20000000
e prj.files=true
Ps test

Save returns:
TODO: prj.files: support copying more than one file into the project directory
Warning: Cannot copy '' into '/Users/brian/.local/share/radare2/projects/transmitter/bin/'
transmitter
SpenserStyles commented 6 years ago

I figured out a work around for Cutter by manually running the RC script.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. Considering a lot has changed since its creation, we kindly ask you to check again if the issue you reported is still relevant in the current version of radare2. If it is, update this issue with a comment, otherwise it will be automatically closed if no further activity occurs. Thank you for your contributions.